Skip to content

Commit be3d1b4

Browse files
fix(types): add generic to Reference.create() (#1208)
1 parent 5cf2c48 commit be3d1b4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Reference.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ export type ReferenceOptions<TValue = unknown> = {
1010
map?: (value: unknown) => TValue;
1111
};
1212

13-
export function create(key: string, options?: ReferenceOptions) {
14-
return new Reference(key, options);
13+
export function create<TValue = unknown>(key: string, options?: ReferenceOptions<TValue>) {
14+
return new Reference<TValue>(key, options);
1515
}
1616

1717
export default class Reference<TValue = unknown> {

0 commit comments

Comments
 (0)