Skip to content

Commit

Permalink
Compatibility with TypeScript 5.6.2 (#176)
Browse files Browse the repository at this point in the history
Fix TSC error on TS 5.6.2
  • Loading branch information
guyca authored Sep 10, 2024
1 parent 46c6c1b commit d0c07bb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class GraphRegistry {
}

private getFirst<T extends Graph>(Graph: Constructable<T>): T {
return this.constructorToInstance.get(Graph)!.values().next().value;
return this.constructorToInstance.get(Graph)!.values().next().value as T;
}

private getByInjectionToken<T extends Graph>(Graph: Constructable<T>, injectionToken?: string): T {
Expand Down

0 comments on commit d0c07bb

Please sign in to comment.