downlevel-dts
downlevel-dts copied to clipboard
downlevel template literal types
there is missing support for template literal types introduced in TS 4.1
Current Behaviour
export declare type Greeting = `hello ${World}`
declare type World = 'world'
↓↓↓ downlevel-dts ↓↓↓
export declare type Greeting = `hello ${World}`
declare type World = 'world'
Expected Behaviour
export declare type Greeting = `hello ${World}`
declare type World = 'world'
↓↓↓ downlevel-dts ↓↓↓
// Good enough
export declare type Greeting = string
// This would be awesome
export declare type Greeting = `hello world`
declare type World = 'world'