You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
In JS, aliasing exports = {} omits the expected string index signature #25687
No error, and import('util') has a property existy. (Ideally util would also have a property existy inside util.js, but this is not true in 2.9.2 either.)
Actual behavior:
Error: Property 'x' does not exist on type '{}', but require('util')does have a property existy: () => void.
Activity
sandersn commentedon Jul 16, 2018
#25619 causes module.exports assignments to be contextually typed, and we don't add an index signature when there is a contextual type.
This wouldn't be a problem, except that
utilwasn't really the type of the module anyway, so without the index signature,existydidn't really exist.