You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior:
Template declaration in JSDoc comments should not supersede the in-code template declarations.
Actual behavior:
In example 0 and 2 above, the generic type T is not found to properly extend { prop: string } when the JSDoc comment exists presumably because the JSDoc comment supersedes the type defined inline. This should never be the case where a non-code element takes precedence over the code contents.
The text was updated successfully, but these errors were encountered:
TypeScript Version: 2.4
Code
Example 0
ERROR: error TS2536: Type '"prop"' cannot be used to index type 'T'.
ERROR: error TS2339: Property 'prop' does not exist on type 'T'.
Example 1
Works fine
Example 2
ERROR: error TS2536: Type '"prop"' cannot be used to index type 'T'.
ERROR: error TS2339: Property 'prop' does not exist on type 'T'.
Example 3
Works fine
Expected behavior:
Template declaration in JSDoc comments should not supersede the in-code template declarations.
Actual behavior:
In example 0 and 2 above, the generic type T is not found to properly extend { prop: string } when the JSDoc comment exists presumably because the JSDoc comment supersedes the type defined inline. This should never be the case where a non-code element takes precedence over the code contents.
The text was updated successfully, but these errors were encountered: