Skip to content

JS: Support for TypeScript 4.1#4709

Merged
asgerf merged 6 commits intogithub:mainfrom
asgerf:js/typescript-4.1
Dec 4, 2020
Merged

JS: Support for TypeScript 4.1#4709
asgerf merged 6 commits intogithub:mainfrom
asgerf:js/typescript-4.1

Conversation

@asgerf
Copy link
Contributor

@asgerf asgerf commented Nov 23, 2020

Currently just adds support for template literal types

@asgerf asgerf added the JS label Nov 23, 2020
@asgerf asgerf marked this pull request as ready for review November 25, 2020 17:20
@asgerf asgerf requested a review from a team as a code owner November 25, 2020 17:20
@asgerf
Copy link
Contributor Author

asgerf commented Nov 25, 2020

@erik-krogh can you review?

Copy link
Contributor

@erik-krogh erik-krogh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comment about the yarn.lock file.

The rest looks good to me.

erik-krogh
erik-krogh previously approved these changes Dec 2, 2020
Copy link
Contributor

@erik-krogh erik-krogh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Optional:
I think the workaround I added earlier can be removed now:

} else if (rawPath instanceof TemplateLiteral) {
// this is a type-error, so we just fall back to some behavior that does not crash the extractor.
path = new Literal(rawPath.getLoc(), TokenType.string, ((TemplateLiteral)rawPath).getQuasis().stream().map(q -> q.getRaw()).collect(Collectors.joining("")));
} else {

@asgerf asgerf added the depends on internal PR This PR should only be merged in sync with an internal Semmle PR label Dec 2, 2020
@asgerf asgerf force-pushed the js/typescript-4.1 branch from 38cdeab to e91869f Compare December 2, 2020 11:58
@asgerf asgerf merged commit 22dbaf2 into github:main Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

depends on internal PR This PR should only be merged in sync with an internal Semmle PR documentation JS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments