Skip to content

Conversation

machty
Copy link
Owner

@machty machty commented Feb 9, 2024

Attempt to fix #564

Currently running into issues with jscodeshift/babel failing to parse export const foo = ... in .d.ts files in declaration.

cc @NullVoxPopuli

@machty machty changed the title First attempt, with parser errors Fix superfluous triple-slash declarations Feb 9, 2024
@NullVoxPopuli
Copy link

NullVoxPopuli commented Feb 9, 2024

I was able to easily reproduce the issue you mentioned in discord in the test suite.

Here is what the tests look like to see how to test this sort of stuff NullVoxPopuli/fix-bad-declaration-output#10

it seems this is the issue: facebook/jscodeshift#539

@NullVoxPopuli
Copy link

NullVoxPopuli commented Feb 9, 2024

after some more digging, it seems the types are wrong -- how are they generated?

a d.ts file should have declare if a const is not going to have an initializer.

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

Successfully merging this pull request may close these issues.

Superfluous triple-slash directives generated by Glint produce Glint errors (manually removing them fixes this)
2 participants