-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: export types for typescript (#78)
When TypeScript's module system is set to `NodeNext` (as [recommended](https://www.typescriptlang.org/tsconfig#module)), the types cannot be found because they are not present in the export map. This change fixes the problem by adding the types to the export map. Additionally: - it reconfigures the "types" test fixture to: - use `strict` mode - `module: NodeNext` - enables lib checking (thus validating `env.d.ts`) - runs `tsc --build` on `npm install` - updates `types.test.js` accordingly - upgrades `typescript` to latest - fix `pkg.test.mjs` to correctly reference the updated export map
- Loading branch information
Showing
6 changed files
with
26 additions
and
15 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
{ | ||
"compilerOptions": {} | ||
"compilerOptions": { | ||
"skipLibCheck": false, | ||
"module": "NodeNext", | ||
"strict": true, | ||
}, | ||
"files": ["index.ts"] | ||
} |
This file contains 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
This file contains 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