Skip to content

Provide a core types Type (result of typeof) #61427

Closed as not planned
Closed as not planned
@npenin

Description

@npenin

⚙ 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

No one assigned

    Labels

    DeclinedThe issue was declined as something which matches the TypeScript visionSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions