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
I need to override an experiment property in Chrome and encounter this error.
if ('scrollRestoration' in history) { history.scrollRestoration = 'manual'; // type error }
I found the answers at: http://stackoverflow.com/questions/18083389/ignore-typescript-errors-property-does-not-exist-on-value-of-type. But not sure which one is the right way to go.
(history as any).scrollRestoration = 'manual';
vs
history['scrollRestoration'] = 'manual';
It seems that TypeScript's docs / deep dive book doesn't mention about the squared brackets syntax.
The text was updated successfully, but these errors were encountered:
I'd go with the first one. The second one works, but only if you compile without -noImplicitAny.
-noImplicitAny
Sorry, something went wrong.
No branches or pull requests
I need to override an experiment property in Chrome and encounter this error.
I found the answers at: http://stackoverflow.com/questions/18083389/ignore-typescript-errors-property-does-not-exist-on-value-of-type. But not sure which one is the right way to go.
vs
It seems that TypeScript's docs / deep dive book doesn't mention about the squared brackets syntax.
The text was updated successfully, but these errors were encountered: