Skip to content

Commit 606f8d1

Browse files
author
Jack Ellis
committed
fix: incompatible types between v3 and v4
we were attempting to grab the opts from the parameters of jpex.resolve a) this doesn't work as expected because of the order of our overloads b) this doesn't work at all with jpex v3 c) the @ts-ignore safeguard is stripped out of the declaration file, d'oh
1 parent c0a0faf commit 606f8d1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/useResolve.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import { useMemo } from 'react';
2-
import { JpexInstance } from 'jpex';
32
import useJpex from './useJpex';
43

5-
// @ts-ignore
6-
type Opts = Parameters<JpexInstance['resolve']>[0]
4+
interface Opts {
5+
optional?: boolean,
6+
with?: {
7+
[key: string]: any,
8+
},
9+
}
710

811
interface UseResolve {
912
<T>(): T

0 commit comments

Comments
 (0)