Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asserts assertion guard not downleveled when used as type annotation #52

Open
spenceryue opened this issue Feb 25, 2021 · 0 comments
Open

Comments

@spenceryue
Copy link

spenceryue commented Feb 25, 2021

Input

export const foo: (_: number | string) => asserts _ is number = (_) => {};

Output

export declare const foo: (_: number | string) => asserts _ is number;

Workaround

export function foo(_: number | string): asserts _ is number {}

Details

node 12.18.2
downlevel-dts 0.6.0
command node_modules/.bin/downlevel-dts dist/my-package dist/my-package/ts3.4 --to=3.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant