Skip to content

Commit

Permalink
Add types for flyd/module/obj stream function
Browse files Browse the repository at this point in the history
The types are a bit of a hack but do seem to work in the typescript
playground.
  • Loading branch information
Einar Norðfjörð committed Apr 17, 2018
1 parent bf6119b commit 44c78e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ declare module 'flyd/module/mergeall' {

declare module 'flyd/module/obj' {
interface ObjModule {
streamProps<T>(obj: T): {[P in keyof T]: flyd.Stream<T[P]> };
streamProps<T>(obj: T): { [P in keyof T]: flyd.Stream<T[P]> };
stream<T extends { [key: string]: flyd.Stream<any> }>(obj: T): flyd.Stream<{ [P in keyof T]: T[P]['val'] }>;
extractProps(obj: any): any;
}

Expand Down

0 comments on commit 44c78e2

Please sign in to comment.