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
When declaring a symbol-indexed property on an existing interface, attempting to use it gives error TS7017 in VSCode. tsc, however, compiles it without complaint, implying a bug in tsserver.
TypeScript Version: 3.3.0-dev.20190119
Search Terms: TS7017 tsserver symbol property
Code
constadditionalProp=Symbol();interfaceDocument{[additionalProp]?: number;}document[additionalProp]=42;// TS7017 in tsserver/vscode (but not tsc)console.log(document[additionalProp]);// same
When declaring a symbol-indexed property on an existing interface, attempting to use it gives error TS7017 in VSCode.
tsc
, however, compiles it without complaint, implying a bug intsserver
.TypeScript Version: 3.3.0-dev.20190119
Search Terms: TS7017 tsserver symbol property
Code
tsconfig.json
:Expected behavior:
The above code does not have any error highlights.
Actual behavior:
There is an error highlight. The hover says: “Element implicitly has an 'any' type because 'Document' has no index signature. ts (7017)”
Playground Link — The Playground also shows the incorrect error highlight.
Related Issues: None, as far as I can tell.
The text was updated successfully, but these errors were encountered: