We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
TypeScript Version: 2.1.5
Code
interface DataSnapshot { child(path: string): DataSnapshot; } interface Snapshot<T> extends DataSnapshot { child<U extends keyof T>(path: U): Snapshot<T[U]>; }
Expected behavior:
Should compile.
Actual behavior:
Gives error:
Excessive stack depth comparing types 'Snapshot' and 'DataSnapshot'. [2321]
If the definition of DataSnapshot#child is changed to child(path:string): any; , then no error occurs.
DataSnapshot#child
child(path:string): any;
TypeScript Version: 2.1.5
Code
Expected behavior:
Should compile.
Actual behavior:
Gives error:
If the definition of
DataSnapshot#childis changed tochild(path:string): any;, then no error occurs.