-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed as not planned
Labels
DeclinedThe issue was declined as something which matches the TypeScript visionThe issue was declined as something which matches the TypeScript visionSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
⚙ Compilation target
es2015
⚙ Library
none
Missing / Incorrect Definition
I could not find a type that provides the result of typeof. The workaround is
declare let a: unknown;
const b = typeof a;
type Types = typeof b;
Sample Code
export function polymorph(type: Types){
switch(type){
///case ...
}
}
Documentation Link
No response
Metadata
Metadata
Assignees
Labels
DeclinedThe issue was declined as something which matches the TypeScript visionThe issue was declined as something which matches the TypeScript visionSuggestionAn idea for TypeScriptAn idea for TypeScript