Open ribizli opened 7 years ago
export interface SelectSignature<T = any> { <R>(key: keyof T, ...paths: string[]): Observable<R>; <R>(mapFn: (state: T) => R): Observable<R>; }
So TypeScript can check for using the correct key at least on the top level:
export interface MyState { myKey: any } ... Store<MyState> store; store.select('myKey'); // fine store.select('invalidKey'); // type error
So TypeScript can check for using the correct key at least on the top level: