Skip to content

Commit

Permalink
fix(types): add generic to Reference.create() (#1208)
Browse files Browse the repository at this point in the history
  • Loading branch information
florianeckerstorfer committed Jan 5, 2021
1 parent 5cf2c48 commit be3d1b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Reference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export type ReferenceOptions<TValue = unknown> = {
map?: (value: unknown) => TValue;
};

export function create(key: string, options?: ReferenceOptions) {
return new Reference(key, options);
export function create<TValue = unknown>(key: string, options?: ReferenceOptions<TValue>) {
return new Reference<TValue>(key, options);
}

export default class Reference<TValue = unknown> {
Expand Down

0 comments on commit be3d1b4

Please sign in to comment.