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.4
Code
let test = {a:1, b:1}; let a = Object.keys(test); //currently string[] interface ObjectConstructor2 extends ObjectConstructor { keys<T>(o: T): (keyof T)[]; } let correct = (<ObjectConstructor2>Object).keys(test);
Expected behavior: keys actually returns keys
Actual behavior: keys returns non-specific string array
The text was updated successfully, but these errors were encountered:
This is intentional. Types in TS are open ended. So keysof will likely be less than all properties you would get at runtime.
Sorry, something went wrong.
No branches or pull requests
TypeScript Version: 2.1.4
Code
Expected behavior:
keys actually returns keys
Actual behavior:
keys returns non-specific string array
The text was updated successfully, but these errors were encountered: