Variable materialization with typeof #50530
Labels
Declined
The issue was declined as something which matches the TypeScript vision
Suggestion
An idea for TypeScript
Suggestion
π Search Terms
typeof window
β Viability Checklist
My suggestion meets these guidelines:
β Suggestion
typeof undeclared_variable !== 'undefined'should putundeclared_variableinto scope.π Motivating Example
π» Use Cases
TS has a design goal of typing common JS patterns, and absence of such typing doesn't allow typing dynamically loaded modules without extending global interfaces. Global declarations are widely considered an antipattern.
The text was updated successfully, but these errors were encountered: