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

.d.ts files should be forbidden from importing .ts files #641

Open
sandersn opened this issue Mar 20, 2023 · 0 comments
Open

.d.ts files should be forbidden from importing .ts files #641

sandersn opened this issue Mar 20, 2023 · 0 comments

Comments

@sandersn
Copy link
Member

.d.ts files should not be able to import .ts files; .ts files are supposed to be only for testing. But it's too easy to make a mistake and use .ts for a file intended for shipping types. See for example https://discord.com/channels/508357248330760243/757992230077333655/1086956594736148511

To repro:

cd $dt/types/adobe__pdfservices-node-sdk
git mv client-config.d.ts client-config.ts
npm test adobe__pdfservices-node-sdk

Expected: Error "Index.d.ts can't import from client-config.ts because it's a .ts file"
Actual: Compile error because client-config.ts uses syntax that is illegal in .ts (function signature without declare or following implementation signature).

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

No branches or pull requests

1 participant