Skip to content

Bundler Typescript failing on TS type alias #10024

Closed Answered by BSteffaniak
BSteffaniak asked this question in Q&A
Discussion options

You must be logged in to vote

I think I was able to get this working. I noticed that the ts_to_js strips all ts types using strip, so I tried that out like this:

let module = parse_file_as_program(&fm, syntax, EsVersion::Es2020, None, &mut Vec::new()).unwrap();

let unresolved_mark = Mark::new();
let top_level_mark = Mark::new();

let module = module.apply(&mut strip(unresolved_mark, top_level_mark));

This got me past that error (and bundling worked just fine).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by BSteffaniak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant