- Install expect-type@1.4.0 (devDependency) - New src/index.test.ts exercises the public API with both runtime assertions (node:assert/strict inside node:test) and type-level assertions (expectTypeOf().toEqualTypeOf, toMatchTypeOf, toHaveProperty) - Tests are excluded from tsc -p tsconfig.build.json (no .d.ts pollution in dist/) - Type-level checks happen during tsc --noEmit (run by 'npm run check' and the test script); expectTypeOf assertions have no runtime side effect, so they pair naturally with node --test in the same test() blocks - cspell: add EDITMSG to dictionary (used in commit-message-template path) - oxlint test-file overrides: silence no-nodejs-modules (we use node: builtins) and no-magic-numbers (literals in tests are fine) Coverage: - match() returns a builder with with/exhaustive/otherwise - P.literal narrows to its literal type, P.type to its typeof target - exhaustive() returns the union of handler return types - otherwise() falls back when no case matches - exhaustive() throws when no case matches
19 lines
372 B
JSON
19 lines
372 B
JSON
{
|
|
"version": "0.2",
|
|
"language": "en",
|
|
"words": [
|
|
"tslib",
|
|
"typefest",
|
|
"lefthook",
|
|
"oxlint",
|
|
"oxfmt",
|
|
"oxc",
|
|
"nodenext",
|
|
"nocheck",
|
|
"oxfmtrc",
|
|
"oxlintrc",
|
|
"sortpackagerc",
|
|
"EDITMSG"
|
|
],
|
|
"ignorePaths": ["dist", "node_modules", "public", "coverage", "*.svg"]
|
|
} |