-
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.
Some projects have been struggling to import from this package because of some node target stuff I do not understand. We now support both ESModules and CommonJS. Additionally suggest users run the example scripts with tsx. WINNING!
- Loading branch information
Showing
12 changed files
with
223 additions
and
123 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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"outDir": "dist/cjs", | ||
} | ||
} |
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.json", | ||
"compilerOptions": { | ||
"target": "ESNext", | ||
"module": "ESNext", | ||
"outDir": "dist/esm", | ||
} | ||
} |
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,26 +1,29 @@ | ||
{ | ||
"compilerOptions": { | ||
// Enable latest features | ||
"lib": ["ESNext"], | ||
"target": "ESNext", | ||
"jsx": "react-jsx", | ||
"allowJs": true, | ||
"target": "ES2020", | ||
"moduleResolution": "Node", | ||
"resolveJsonModule": true, | ||
|
||
"declaration": true, | ||
"outDir": "dist", | ||
"esModuleInterop": true, | ||
|
||
// Best practices | ||
"strict": true, | ||
"skipLibCheck": true, | ||
"noFallthroughCasesInSwitch": true, | ||
|
||
// Some stricter flags (disabled by default) | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"noPropertyAccessFromIndexSignature": false | ||
"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"] | ||
} |
Oops, something went wrong.