-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tyring suggestion from https://www.sensedeep.com/blog/posts/2021/how-…
- Loading branch information
Showing
5 changed files
with
63 additions
and
34 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
cat >dist/cjs/package.json <<!EOF | ||
{ | ||
"type": "commonjs" | ||
} | ||
!EOF | ||
|
||
cat >dist/mjs/package.json <<!EOF | ||
{ | ||
"type": "module" | ||
} | ||
!EOF |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"compilerOptions": { | ||
"moduleResolution": "Node", | ||
"declaration": true, | ||
"esModuleInterop": true, | ||
|
||
// Best practices | ||
"strict": true, /* Enable all strict type-checking options. */ | ||
"noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ | ||
"strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ | ||
"strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ | ||
"strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ | ||
"strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ | ||
"noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ | ||
"useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ | ||
"alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ | ||
"noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ | ||
"noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ | ||
"exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ | ||
"noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ | ||
"noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ | ||
"noUncheckedIndexedAccess": true, | ||
"noPropertyAccessFromIndexSignature": false, | ||
"skipLibCheck": true | ||
}, | ||
"include": ["src/**/*.ts"], | ||
"exclude": ["node_modules", "dist", "examples", "tests", "eslint.config.js"] | ||
} |
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,8 @@ | ||
{ | ||
"extends": "./tsconfig-base.json", | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"outDir": "dist/cjs", | ||
"target": "ES2020" | ||
} | ||
} |
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,32 +1,8 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES2020", | ||
"module": "ESNext", | ||
"moduleResolution": "Node", | ||
|
||
"declaration": true, | ||
"outDir": "dist", | ||
"esModuleInterop": true, | ||
|
||
// Best practices | ||
"strict": true, /* Enable all strict type-checking options. */ | ||
"noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ | ||
"strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ | ||
"strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ | ||
"strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ | ||
"strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ | ||
"noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ | ||
"useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ | ||
"alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ | ||
"noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ | ||
"noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ | ||
"exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ | ||
"noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ | ||
"noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ | ||
"noUncheckedIndexedAccess": true, | ||
"noPropertyAccessFromIndexSignature": false, | ||
"skipLibCheck": true | ||
}, | ||
"include": ["src/**/*.ts"], | ||
"exclude": ["node_modules", "dist", "examples", "tests", "eslint.config.js"] | ||
} | ||
"extends": "./tsconfig-base.json", | ||
"compilerOptions": { | ||
"module": "ESNext", | ||
"outDir": "dist/mjs", | ||
"target": "ESNext" | ||
} | ||
} |