We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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;
The text was updated successfully, but these errors were encountered:
@ahejlsberg thoughts?
Sorry, something went wrong.
ahejlsberg
No branches or pull requests
TypeScript Version: 2.1.5
Code
Expected behavior:
Should compile.
Actual behavior:
Gives error:
If the definition of
DataSnapshot#child
is changed tochild(path:string): any;
, then no error occurs.The text was updated successfully, but these errors were encountered: