TypeScript/tests/cases/conformance/salsa/typeLookupInIIFE.ts
Nathan Shively-Sanders 9dd8e296f3
Fix crash in type resolution in JS IIFEs (#23171)
* Fix crash in type resolution in JS IIFEs

We recognise IIFEs as JS special assignment initialisers, but not as
containers otherwise. That means that IIFEs will not have a symbol
unless they have an *outside* assignment.

The permanent fix will be to make IIFEs a container, based on the
containership of the value that they return. This fix does not do that;
it just makes type resolution return undefined instead of crashing.

* Comment the IIFE-fix line
2018-04-05 09:57:35 -07:00

10 lines
172 B
TypeScript

// @noEmit: true
// @allowJs: true
// @checkJs: true
// @noImplicitAny: true
// @Filename: a.js
// #22973
var ns = (function() {})();
/** @type {ns.NotFound} */
var crash;