We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
unknown
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
interface index signature assignment assignability
From 4.0 to Nightly. (I haven't tested it with older versions.)
Playground link
interface MyObject { prop: string } declare let a: { [x in string]: unknown } declare let b: { [x in string]: any } declare let c: MyObject a = c // error at this line b = c
Type 'MyObject' is not assignable to type '{ [x: string]: unknown; }'. Index signature is missing in type 'MyObject'.
No errors.
The text was updated successfully, but these errors were encountered:
See #42825 (comment).
Sorry, something went wrong.
No branches or pull requests
Bug Report
π Search Terms
interface
index signature
assignment
assignability
π Version & Regression Information
From 4.0 to Nightly. (I haven't tested it with older versions.)
β― Playground Link
Playground link
π» Code
π Actual behavior
Type 'MyObject' is not assignable to type '{ [x: string]: unknown; }'. Index signature is missing in type 'MyObject'.
π Expected behavior
No errors.
The text was updated successfully, but these errors were encountered: