machty / ember-concurrency

ember-concurrency is an Ember Addon that enables you to write concise, worry-free, cancelable, restartable, asynchronous tasks.
http://ember-concurrency.com
MIT License
691 stars 155 forks source link

Fix superfluous triple-slash declarations #565

Open machty opened 4 months ago

machty commented 4 months ago

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

NullVoxPopuli commented 4 months ago

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 https://github.com/NullVoxPopuli/fix-bad-declaration-output/pull/10

it seems this is the issue: https://github.com/facebook/jscodeshift/issues/539

NullVoxPopuli commented 4 months ago

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.