-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(allow-scripts): prototype of declaration file generation
This adds `.d.ts` generation to `@lavamoat/allow-scripts`. - Many type defs added to `src/types` for those modules which do not have them (nor are there any published to DefinitelyTyped). In the future, some of these could be submitted to DefinitelyTyped, if we wish. - Upgrade `yargs` - Create reusable TS configuration supporting incremental builds - Declaration files generated at build time and shipped in the `types` folder (which is now in `.gitignore`) - Created `.depcheckrc` - Added, updated, removed and/or fixed many docstring types Note: the uncommon `skipLibCheck = false` setting in this module's `tsconfig.json` enables typechecking of the `.d.ts` files themselves. These files are not compiled.
- Loading branch information
Showing
19 changed files
with
368 additions
and
55 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -114,3 +114,5 @@ temp/ | |
|
||
# JetBrains | ||
.idea | ||
|
||
packages/allow-scripts/types |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"compilerOptions": { | ||
"allowJs": true, | ||
"allowSyntheticDefaultImports": true, | ||
"checkJs": true, | ||
"declaration": true, | ||
"declarationMap": true, | ||
"emitDeclarationOnly": true, | ||
"composite": true, | ||
"types": ["node"] | ||
}, | ||
"extends": "@tsconfig/node14/tsconfig.json" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
ignores: | ||
# monorepo deps | ||
- 'ava' | ||
- "@types/npmcli__promise-spawn" | ||
|
||
# only types (from @types/npmcli__promise-spawn) are referenced | ||
- "@npmcli/promise-spawn" |
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
Oops, something went wrong.