-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Destructuring assignments are producing errors with noImplicitAny #8229
New issue
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
Milestone
Comments
looks like a regression from #6935 |
@sheetalkamat Any update on this issue? I came across the problem again when trying to build my code-base with the 2.0 beta. |
Closed
This bug is going to be encountered fairly frequently using TS 2.0 beta |
yuit
added a commit
that referenced
this issue
Aug 20, 2016
* Add test case for #8229 * Do not report errors during contextual typecheck Fixes #8229 * Handle the scenario when let [a=undefined]=[] * Don't allow `.ts` to appear in an import * Add specific error message for unwanted '.ts' extension * Allow `await` in a simple unary expression * More tests * Forbid `await await` * Allow `await await` * Improve error message * Don't allow ".d.ts" extension in an import either. * Rename 'find' functions * Move supportedTypescriptExtensionsWithDtsFirst next to supportedTypeScriptExtensions and rename * Fix comment * Treat special property access symbol differently ... when retriving documentation * Fix tests * Update shim version to be 2.1 (#10424) * Check return code paths on getters (#10102) * Check return paths on getters * Remove TODO comment * Remove extraneous arguments from harness's runBaseline (#10419) * Remove extraneous arguments from runBaseline * Address comments from @yuit * Remove needless call to basename * Refactor baseliners out of compiler runner (#10440) * CR feedback * fix broken tests * Pass in baselineOpts into types baselines so that RWC baselines can be written to internal folder (#10443)
yuit
added a commit
that referenced
this issue
Aug 23, 2016
* Add test case for #8229 * Do not report errors during contextual typecheck Fixes #8229 * Handle the scenario when let [a=undefined]=[] * Instantiate contextual this parameters if needed * Test that contextually typed generic this parameters are instantiated * Don't allow `.ts` to appear in an import * Add specific error message for unwanted '.ts' extension * Allow `await` in a simple unary expression * More tests * Forbid `await await` * Allow `await await` * Improve error message * Don't allow ".d.ts" extension in an import either. * Rename 'find' functions * Assign and instantiate contextual this type if not present * JSDoc supports null, undefined and never types * Update baselines in jsDocParsing unit tests * Return non-JsDocComment children ... to make syntactic classification work * Move supportedTypescriptExtensionsWithDtsFirst next to supportedTypeScriptExtensions and rename * Fix comment * Treat special property access symbol differently ... when retriving documentation * Fix tests * Update shim version to be 2.1 (#10424) * Check return code paths on getters (#10102) * Check return paths on getters * Remove TODO comment * Remove extraneous arguments from harness's runBaseline (#10419) * Remove extraneous arguments from runBaseline * Address comments from @yuit * Remove needless call to basename * Refactor baseliners out of compiler runner (#10440) * CR feedback * fix broken tests * Pass in baselineOpts into types baselines so that RWC baselines can be written to internal folder (#10443) * Add more test for 10426 * routine update of dom libs * Add test for jsdoc syntactic classification for function declaration * Simplify implementation * Tolerate certain errors in tsconfig.json * Add test for configFile error tolerance * Use TS parser to tolerate more errors in tsconfig.json * Implement tuple types as type references to synthesized generic types * Add comments + minor changes * Accept new baselines * Add .types extension * Properly guard for undefined in getTypeReferenceArity * Add jsdoc nullable union test case to fourslash * Fix class/interface merging issue + lint error * Allow "typings" in a package.json to be missing its extension (but also allow it to have an extension) * Contextually type this in getDeclFromSig, not checkThisExpr * Update parser comment with es7 grammar (#10459) * Use ES7 term of ExponentiationExpression * Update timeout for mac OS * Address PR: add space * allowSyntheticDefaultImports resolves to modules instead of variables Fixes #10429 by improving the fix in #10096 * Rename getContextuallyTypedThisParameter to getContextualThisParameter * Fix 10472: Invalid emitted code for await expression (#10483) * Properly emit await expression with yield expression * Add tests and update baselines * Move parsing await expression into parse unary-expression * Update incorrect comment
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I found an issue in the current nightly builds relating to destructuring assignments with noImplicitAny enabled. The actual code was more complicated, but it can be simplified to the following:
The variables appear to be typed correctly on hover, however, 3 errors are produced inside the assignment stating that
a
,b
, andc
have an implicit type of any.It can be silenced by the following, but that's not ideal:
TypeScript Version:
Searching backwards, it first appears in:
Expected behavior:
There shouldn't be an implicit any error in this case.
Actual behavior:
An erroneous error is produced.
The text was updated successfully, but these errors were encountered: