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

Add TypeScript support. Closes #1025 #1026

Merged
merged 6 commits into from
Dec 31, 2021
Merged

Add TypeScript support. Closes #1025 #1026

merged 6 commits into from
Dec 31, 2021

Conversation

hueniverse
Copy link
Contributor

No description provided.

@hueniverse hueniverse added the feature New functionality or improvement label Dec 24, 2021
Copy link
Member

@devinivy devinivy left a comment

Choose a reason for hiding this comment

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

Was finally able to give this a proper read. It looks good to me and I'm all for the functionality— thanks!

Copy link
Contributor

@kanongil kanongil left a comment

Choose a reason for hiding this comment

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

It would be nice with better typescript integration, but I'm concerned about officially supporting it. The main issue is that the transpiling can introduce extra checks in the output, some of which can be impossible to reach using tests, causing coverage to fall. I don't know if there is a reasonable solution to this?

I would also like to see a test for how --typescript behaves when the dependency is missing, similar to

it('runs when typescript fails to load', async () => {

lib/modules/leaks.js Show resolved Hide resolved
lib/modules/typescript.js Outdated Show resolved Hide resolved
lib/modules/typescript.js Outdated Show resolved Hide resolved
lib/modules/typescript.js Outdated Show resolved Hide resolved
lib/modules/typescript.js Outdated Show resolved Hide resolved
@hueniverse
Copy link
Contributor Author

It would be nice with better typescript integration, but I'm concerned about officially supporting it. The main issue is that the transpiling can introduce extra checks in the output, some of which can be impossible to reach using tests, causing coverage to fall. I don't know if there is a reasonable solution to this?

We need to move to use v8 built-in coverage tooling to get proper coverage reports and get rid of the way we do it today. That said, it works pretty well. I haven't hit any actual issues with coverage so far. The additional code is pretty small and supporting it would be trivial. If limitations are found in the future, we can deal with them then or move support elsewhere as last resort.

@hueniverse
Copy link
Contributor Author

I would also like to see a test for how --typescript behaves when the dependency is missing, similar to

No need since this is only in the cli, not the reporter so it will just fail as expected.

@hueniverse hueniverse added this to the 24.4.1 milestone Dec 31, 2021
@kanongil
Copy link
Contributor

kanongil commented Jan 5, 2022

It would be nice with better typescript integration, but I'm concerned about officially supporting it. The main issue is that the transpiling can introduce extra checks in the output, some of which can be impossible to reach using tests, causing coverage to fall. I don't know if there is a reasonable solution to this?

We need to move to use v8 built-in coverage tooling to get proper coverage reports and get rid of the way we do it today. That said, it works pretty well. I haven't hit any actual issues with coverage so far. The additional code is pretty small and supporting it would be trivial. If limitations are found in the future, we can deal with them then or move support elsewhere as last resort.

I'm talking the coverage tool when applied to .ts files through the transform. It will only see the resulting .js code, which can contain more statements than in the .ts code. Eg. the generated code for a declared enum has an untestable conditional code path, as discussed in #1002.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants