Rename .ts files to .d.ts files - #105
Merged
Merged
Conversation
ocavue
marked this pull request as ready for review
November 13, 2025 08:27
ocavue
force-pushed
the
ocavue/rename-ts-to-dts
branch
from
November 13, 2025 08:33
4dd6dc9 to
35381d6
Compare
Contributor
Author
|
@ttt43ttt Hi. Do you want me to rebase this pull request and resolve the conflicts? |
Contributor
yes, please |
ocavue
force-pushed
the
ocavue/rename-ts-to-dts
branch
from
January 29, 2026 04:43
35381d6 to
64e0ffc
Compare
Contributor
Author
|
@ttt43ttt done |
Contributor
|
@ocavue sorry for the delay. Could you resolve the merge conflicts? |
…-dts # Conflicts: # package-lock.json # package.json
Contributor
Author
|
@ttt43ttt done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, the TypeScript declarations are stored in
.tsfiles, and we usetscto compile them into.d.tsfiles. This step is unnecessary, and we don't really want all those.jsand.js.mapfiles underdist/. We can simply place all TypeScript declarations directly in.d.tsfiles.This pull request includes the following changes:
.tsfiles to.d.tsfiles undersrc/.typesfield inpackage.jsonto point directly tosrc/index.d.ts.tsconfig.json:"noEmit": trueso that no./dist/**/*.d.tsfiles will be generated anymore."skipLibCheck": falseto ensure thattscstill verifies our code. More on that below.Add"types": []to preventtscfrom accidentally pickingnode_modules/@types/node. This will also be the default behavior in the upcoming TypeScript 6.0: Change default oftypesto[]intsconfig.jsonmicrosoft/TypeScript#62195Please note that I did not remove the
"build": "tsc"script inpackage.json. We will need this script to check our.d.tsfiles undersrc/. I tested it using the following example: