-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check rollup types, add jsdoc-plugin-typescript
I began to add a larger test using Vite and this plugin, and the HandlebarsPrecompiler() function produced type check errors. So it seemed prudent to actually use Rollup types instead of simulating them and instructing users to disable checking. At the same time, I learned I didn't need to disable type checking for my vitest.config.js files after all. Some of the specific changes include: - Using `...(configDefaults.coverage.exclude || [])` as appropriate to avoid type errors due to configDefaults.coverage.exclude potentially being undefined. - Adding 'rollup' as a devDependency and adding `import("rollup").Type` as appropriate in JSDoc `@type` directives. - Adding 'jsdoc-plugin-typescript' to the build to handle the TypeScript `import().Type` directives. This ended up pulling in the 'es-abstract' module, which blew up the pnpm-lock.yaml file. If I get an itch, I'll implement my own plugin one day and replace it. - Removing redundant types from lib/types.js. This included removing PrecompilerOptions, which I realized I was already visible from the 'handlebars' module. - Adding "DOM" to the "lib" field of jsconfig.json. - Added a JSDoc type cast to main.test.js to eliminate type errors. This is safe because we're testing our own object that is known to have certain methods defined.
- Loading branch information
Showing
10 changed files
with
575 additions
and
90 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
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
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
Oops, something went wrong.