diff --git a/index.js b/index.js index 44f2031..0e927d5 100644 --- a/index.js +++ b/index.js @@ -7,6 +7,11 @@ var hasArrayBuffer = typeof ArrayBuffer === 'function' && !!ArrayBuffer.isView; // Note: We **don't** need `envHasBigInt64Array` in fde es6/index.js +/** + * @param {any} a + * @param {any} b + * @returns {boolean} + */ function equal(a, b) { // START: fast-deep-equal es6/index.js 3.1.3 if (a === b) return true; @@ -61,7 +66,14 @@ function equal(a, b) { } // END: Modifications - if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) { + // Types: the casts stop `isView()` narrowing `a` and `b` to + // `ArrayBufferView`, which has no `length` or index signature (typed + // arrays have both, a `DataView` has neither). + if ( + hasArrayBuffer && + ArrayBuffer.isView(/** @type {unknown} */ (a)) && + ArrayBuffer.isView(/** @type {unknown} */ (b)) + ) { length = a.length; if (length != b.length) return false; for (i = length; i-- !== 0;) if (a[i] !== b[i]) return false; @@ -130,10 +142,19 @@ function equal(a, b) { } // end fast-deep-equal +/** + * Deep equality check, tuned for React elements. + * + * @template [A=any] + * @template [B=any] + * @param {A} a + * @param {B} b + * @returns {boolean} + */ module.exports = function isEqual(a, b) { try { return equal(a, b); - } catch (error) { + } catch (/** @type {any} */ error) { if ((error.message || '').match(/stack|recursion/i)) { // warn on circular references, don't crash // browsers give this different errors name and messages: diff --git a/package.json b/package.json index e5d9fcc..d7842f2 100644 --- a/package.json +++ b/package.json @@ -6,17 +6,18 @@ "typings": "index.d.ts", "scripts": { "preversion": "pnpm check", - "check": "pnpm format && pnpm lint && pnpm test && pnpm pack:check", + "check": "pnpm format && pnpm lint && pnpm types:check && pnpm test && pnpm pack:check", "benchmark": "node benchmark", "format": "oxfmt --check", "format:fix": "oxfmt", "lint": "oxlint --report-unused-disable-directives-severity=error", "lint:fix": "oxlint --report-unused-disable-directives-severity=error --fix", + "types:check": "node scripts/types-check.mjs", "test-browser": "karma start test/browser/karma.conf.js", "test-node": "mocha \"test/node/*.spec.js\"", "test-node-cov": "nyc mocha \"test/node/*.spec.js\"", - "test-ts-usage": "tsc --esModuleInterop --jsx react --noEmit test/typescript/sample-react-redux-usage.tsx test/typescript/sample-usage.tsx", - "test-ts-defs": "tsc --target ES5 index.d.ts", + "test-ts-usage": "tsc --ignoreConfig --esModuleInterop --jsx react --noEmit test/typescript/sample-react-redux-usage.tsx test/typescript/sample-usage.tsx", + "test-ts-defs": "tsc --ignoreConfig --noEmit index.d.ts", "test": "builder concurrent --buffer test-ts-usage test-ts-defs test-node-cov test-browser", "compress": "terser --compress --mangle=\"toplevel:true\" -- index.js", "size-min-gz": "pnpm -s compress | gzip -9 | wc -c", @@ -86,7 +87,7 @@ "shallow-equal-fuzzy": "0.0.2", "sinon": "^15.0.1", "terser": "5.51.2", - "typescript": "^4.9.5", + "typescript": "7.0.2", "webpack": "^5.76.0" }, "nyc": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a667dca..d48d0f5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -296,8 +296,8 @@ importers: specifier: 5.51.2 version: 5.51.2 typescript: - specifier: ^4.9.5 - version: 4.9.5 + specifier: 7.0.2 + version: 7.0.2 webpack: specifier: ^5.76.0 version: 5.76.0 @@ -1358,6 +1358,126 @@ packages: '@types/use-sync-external-store@0.0.3': resolution: {integrity: sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==} + '@typescript/typescript-aix-ppc64@7.0.2': + resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [aix] + + '@typescript/typescript-darwin-arm64@7.0.2': + resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [darwin] + + '@typescript/typescript-darwin-x64@7.0.2': + resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [darwin] + + '@typescript/typescript-freebsd-arm64@7.0.2': + resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [freebsd] + + '@typescript/typescript-freebsd-x64@7.0.2': + resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [freebsd] + + '@typescript/typescript-linux-arm64@7.0.2': + resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [linux] + + '@typescript/typescript-linux-arm@7.0.2': + resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==} + engines: {node: '>=16.20.0'} + cpu: [arm] + os: [linux] + + '@typescript/typescript-linux-loong64@7.0.2': + resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==} + engines: {node: '>=16.20.0'} + cpu: [loong64] + os: [linux] + + '@typescript/typescript-linux-mips64el@7.0.2': + resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==} + engines: {node: '>=16.20.0'} + cpu: [mips64el] + os: [linux] + + '@typescript/typescript-linux-ppc64@7.0.2': + resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [linux] + + '@typescript/typescript-linux-riscv64@7.0.2': + resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==} + engines: {node: '>=16.20.0'} + cpu: [riscv64] + os: [linux] + + '@typescript/typescript-linux-s390x@7.0.2': + resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==} + engines: {node: '>=16.20.0'} + cpu: [s390x] + os: [linux] + + '@typescript/typescript-linux-x64@7.0.2': + resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [linux] + + '@typescript/typescript-netbsd-arm64@7.0.2': + resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [netbsd] + + '@typescript/typescript-netbsd-x64@7.0.2': + resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [netbsd] + + '@typescript/typescript-openbsd-arm64@7.0.2': + resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [openbsd] + + '@typescript/typescript-openbsd-x64@7.0.2': + resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [openbsd] + + '@typescript/typescript-sunos-x64@7.0.2': + resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [sunos] + + '@typescript/typescript-win32-arm64@7.0.2': + resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [win32] + + '@typescript/typescript-win32-x64@7.0.2': + resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [win32] + '@webassemblyjs/ast@1.11.1': resolution: {integrity: sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==} @@ -3256,16 +3376,16 @@ packages: typedarray-to-buffer@3.1.5: resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} - typescript@4.9.5: - resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} - engines: {node: '>=4.2.0'} - hasBin: true - typescript@5.6.1-rc: resolution: {integrity: sha512-E3b2+1zEFu84jB0YQi9BORDjz9+jGbwwy1Zi3G0LUNw7a7cePUrHMRNy8aPh53nXpkFGVHSxIZo5vKTfYaFiBQ==} engines: {node: '>=14.17'} hasBin: true + typescript@7.0.2: + resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==} + engines: {node: '>=16.20.0'} + hasBin: true + ua-parser-js@0.7.31: resolution: {integrity: sha512-qLK/Xe9E2uzmYI3qLeOmI0tEOt+TBBQyUIAh4aAgU05FVYzeZrKUdkAZfBNVGRaHVgV0TDkdEngJSw/SyQchkQ==} deprecated: You are using an outdated version of ua-parser-js. Please update to ua-parser-js v0.7.33 / v1.0.33 / v2.0.0 (or later) to avoid ReDoS vulnerability [CVE-2022-25927](https://github.com/advisories/GHSA-fhg7-m89q-25r3) @@ -4678,6 +4798,66 @@ snapshots: '@types/use-sync-external-store@0.0.3': {} + '@typescript/typescript-aix-ppc64@7.0.2': + optional: true + + '@typescript/typescript-darwin-arm64@7.0.2': + optional: true + + '@typescript/typescript-darwin-x64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-x64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm@7.0.2': + optional: true + + '@typescript/typescript-linux-loong64@7.0.2': + optional: true + + '@typescript/typescript-linux-mips64el@7.0.2': + optional: true + + '@typescript/typescript-linux-ppc64@7.0.2': + optional: true + + '@typescript/typescript-linux-riscv64@7.0.2': + optional: true + + '@typescript/typescript-linux-s390x@7.0.2': + optional: true + + '@typescript/typescript-linux-x64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-sunos-x64@7.0.2': + optional: true + + '@typescript/typescript-win32-arm64@7.0.2': + optional: true + + '@typescript/typescript-win32-x64@7.0.2': + optional: true + '@webassemblyjs/ast@1.11.1': dependencies: '@webassemblyjs/helper-numbers': 1.11.1 @@ -6694,10 +6874,31 @@ snapshots: dependencies: is-typedarray: 1.0.0 - typescript@4.9.5: {} - typescript@5.6.1-rc: {} + typescript@7.0.2: + optionalDependencies: + '@typescript/typescript-aix-ppc64': 7.0.2 + '@typescript/typescript-darwin-arm64': 7.0.2 + '@typescript/typescript-darwin-x64': 7.0.2 + '@typescript/typescript-freebsd-arm64': 7.0.2 + '@typescript/typescript-freebsd-x64': 7.0.2 + '@typescript/typescript-linux-arm': 7.0.2 + '@typescript/typescript-linux-arm64': 7.0.2 + '@typescript/typescript-linux-loong64': 7.0.2 + '@typescript/typescript-linux-mips64el': 7.0.2 + '@typescript/typescript-linux-ppc64': 7.0.2 + '@typescript/typescript-linux-riscv64': 7.0.2 + '@typescript/typescript-linux-s390x': 7.0.2 + '@typescript/typescript-linux-x64': 7.0.2 + '@typescript/typescript-netbsd-arm64': 7.0.2 + '@typescript/typescript-netbsd-x64': 7.0.2 + '@typescript/typescript-openbsd-arm64': 7.0.2 + '@typescript/typescript-openbsd-x64': 7.0.2 + '@typescript/typescript-sunos-x64': 7.0.2 + '@typescript/typescript-win32-arm64': 7.0.2 + '@typescript/typescript-win32-x64': 7.0.2 + ua-parser-js@0.7.31: {} unicode-canonical-property-names-ecmascript@2.0.0: {} diff --git a/scripts/types-check.mjs b/scripts/types-check.mjs new file mode 100644 index 0000000..adc2d20 --- /dev/null +++ b/scripts/types-check.mjs @@ -0,0 +1,75 @@ +// Type-checks `index.js` from its JSDoc and checks it against `index.d.ts` +// (`pnpm types:check`): +// +// 1. Runs `tsc` with `tsconfig.json` (`checkJs`, `strict`), emitting only +// declarations, to a temp dir. Any type error fails. +// 2. Compares the emitted `index.d.ts` with the hand-written one, which is +// what 3.x publishes. Statement order is ignored: `tsc` emits +// `export = isEqual;` before the declaration, and 3.2.2's file has it +// after. Anything else that differs fails, so the two can't drift. +import { execFileSync } from 'node:child_process'; +import fs from 'node:fs'; +import { createRequire } from 'node:module'; +import os from 'node:os'; +import path from 'node:path'; + +const { log, error } = console; + +const rootDir = path.resolve(import.meta.dirname, '..'); +const require = createRequire(import.meta.url); +const tsc = path.join( + path.dirname(require.resolve('typescript/package.json')), + 'bin', + 'tsc' +); + +// Non-empty lines, trimmed and sorted. +const normalize = (text) => + text + .split(/\r?\n/) + .map((line) => line.trim()) + .filter(Boolean) + .sort(); + +// Returns the exit code. +const check = (outDir) => { + try { + execFileSync( + process.execPath, + [ + tsc, + '--project', + path.join(rootDir, 'tsconfig.json'), + '--noEmit', + 'false', + '--declaration', + '--emitDeclarationOnly', + '--removeComments', + '--outDir', + outDir, + ], + { cwd: rootDir, stdio: 'inherit' } + ); + } catch { + error('types:check: tsc failed.'); + return 1; + } + + const emitted = fs.readFileSync(path.join(outDir, 'index.d.ts'), 'utf8'); + const published = fs.readFileSync(path.join(rootDir, 'index.d.ts'), 'utf8'); + if (normalize(emitted).join('\n') !== normalize(published).join('\n')) { + error('types:check: declarations from JSDoc differ from index.d.ts.'); + error('\n--- emitted from index.js ---\n' + emitted); + error('--- index.d.ts ---\n' + published); + return 1; + } + log('types:check: OK (index.js JSDoc matches index.d.ts)'); + return 0; +}; + +const outDir = fs.mkdtempSync(path.join(os.tmpdir(), 'rfc-types-check-')); +try { + process.exitCode = check(outDir); +} finally { + fs.rmSync(outDir, { recursive: true, force: true }); +} diff --git a/test/typescript/sample-react-redux-usage.tsx b/test/typescript/sample-react-redux-usage.tsx index 268ce87..1711708 100644 --- a/test/typescript/sample-react-redux-usage.tsx +++ b/test/typescript/sample-react-redux-usage.tsx @@ -20,7 +20,7 @@ const initialState: IState = { items: [], }; -const reducer = (state: IState, action: IAction) => { +const reducer = (state: IState = initialState, action: IAction) => { return state; }; diff --git a/test/typescript/tsconfig.tsbuildinfo b/test/typescript/tsconfig.tsbuildinfo new file mode 100644 index 0000000..eef12e0 --- /dev/null +++ b/test/typescript/tsconfig.tsbuildinfo @@ -0,0 +1 @@ +{"version":"7.0.2","root":[[44,45]],"packageJsons":["../../node_modules/.pnpm/@types+hoist-non-react-statics@3.3.1/node_modules/@types/hoist-non-react-statics/package.json","../../node_modules/.pnpm/@types+prop-types@15.7.3/node_modules/@types/prop-types/package.json","../../node_modules/.pnpm/@types+react-dom@16.9.8/node_modules/@types/react-dom/package.json","../../node_modules/.pnpm/@types+react@16.9.35/node_modules/@types/react/package.json","../../node_modules/.pnpm/@types+use-sync-external-store@0.0.3/node_modules/@types/use-sync-external-store/package.json","../../node_modules/.pnpm/csstype@2.6.10/node_modules/csstype/package.json","../../node_modules/.pnpm/hoist-non-react-statics@3.3.2/node_modules/hoist-non-react-statics/package.json","../../node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/package.json","../../node_modules/.pnpm/react-redux@8.0.5_@types+react-dom@16.9.8_@types+react@16.9.35_react-dom@18.2.0_react@18.2.0__react@18.2.0_redux@4.2.1/node_modules/react-redux/package.json","../../node_modules/.pnpm/react@18.2.0/node_modules/react/package.json","../../node_modules/.pnpm/redux@4.2.1/node_modules/redux/package.json","../../node_modules/.pnpm/use-sync-external-store@1.0.0_react@18.2.0/node_modules/use-sync-external-store/package.json","../../package.json"],"missingPackageJsons":["../../node_modules/.pnpm/@types+hoist-non-react-statics@3.3.1/node_modules/react/package.json","../../node_modules/.pnpm/@types+react-dom@16.9.8/node_modules/react/package.json","../../node_modules/.pnpm/@types+react@16.9.35/node_modules/prop-types/package.json","../../node_modules/.pnpm/react-redux@8.0.5_@types+react-dom@16.9.8_@types+react@16.9.35_react-dom@18.2.0_react@18.2.0__react@18.2.0_redux@4.2.1/node_modules/@types/use-sync-external-store/with-selector/package.json","../../node_modules/.pnpm/react-redux@8.0.5_@types+react-dom@16.9.8_@types+react@16.9.35_react-dom@18.2.0_react@18.2.0__react@18.2.0_redux@4.2.1/node_modules/react-native/package.json","../../node_modules/.pnpm/react-redux@8.0.5_@types+react-dom@16.9.8_@types+react@16.9.35_react-dom@18.2.0_react@18.2.0__react@18.2.0_redux@4.2.1/node_modules/react-redux/es/components/package.json","../../node_modules/.pnpm/react-redux@8.0.5_@types+react-dom@16.9.8_@types+react@16.9.35_react-dom@18.2.0_react@18.2.0__react@18.2.0_redux@4.2.1/node_modules/react-redux/es/connect/package.json","../../node_modules/.pnpm/react-redux@8.0.5_@types+react-dom@16.9.8_@types+react@16.9.35_react-dom@18.2.0_react@18.2.0__react@18.2.0_redux@4.2.1/node_modules/react-redux/es/hooks/package.json","../../node_modules/.pnpm/react-redux@8.0.5_@types+react-dom@16.9.8_@types+react@16.9.35_react-dom@18.2.0_react@18.2.0__react@18.2.0_redux@4.2.1/node_modules/react-redux/es/package.json","../../node_modules/.pnpm/react-redux@8.0.5_@types+react-dom@16.9.8_@types+react@16.9.35_react-dom@18.2.0_react@18.2.0__react@18.2.0_redux@4.2.1/node_modules/react-redux/es/utils/package.json","../../node_modules/.pnpm/react-redux@8.0.5_@types+react-dom@16.9.8_@types+react@16.9.35_react-dom@18.2.0_react@18.2.0__react@18.2.0_redux@4.2.1/node_modules/use-sync-external-store/with-selector/package.json"],"fileNames":["lib.es6.d.ts","lib.es5.d.ts","lib.es2015.d.ts","lib.dom.d.ts","lib.dom.iterable.d.ts","lib.webworker.importscripts.d.ts","lib.scripthost.d.ts","lib.es2015.core.d.ts","lib.es2015.collection.d.ts","lib.es2015.generator.d.ts","lib.es2015.iterable.d.ts","lib.es2015.promise.d.ts","lib.es2015.proxy.d.ts","lib.es2015.reflect.d.ts","lib.es2015.symbol.d.ts","lib.es2015.symbol.wellknown.d.ts","lib.es2018.asynciterable.d.ts","lib.decorators.d.ts","lib.decorators.legacy.d.ts","../../node_modules/.pnpm/@types+react@16.9.35/node_modules/@types/react/global.d.ts","../../node_modules/.pnpm/csstype@2.6.10/node_modules/csstype/index.d.ts","../../node_modules/.pnpm/@types+prop-types@15.7.3/node_modules/@types/prop-types/index.d.ts","../../node_modules/.pnpm/@types+react@16.9.35/node_modules/@types/react/index.d.ts","../../node_modules/.pnpm/@types+react-dom@16.9.8/node_modules/@types/react-dom/index.d.ts","../../node_modules/.pnpm/react-redux@8.0.5_@types+react-dom@16.9.8_@types+react@16.9.35_react-dom@18.2.0_react@18.2.0__react@18.2.0_redux@4.2.1/node_modules/react-redux/es/utils/reactbatchedupdates.d.ts","../../node_modules/.pnpm/redux@4.2.1/node_modules/redux/index.d.ts","../../node_modules/.pnpm/react-redux@8.0.5_@types+react-dom@16.9.8_@types+react@16.9.35_react-dom@18.2.0_react@18.2.0__react@18.2.0_redux@4.2.1/node_modules/react-redux/es/utils/subscription.d.ts","../../node_modules/.pnpm/react-redux@8.0.5_@types+react-dom@16.9.8_@types+react@16.9.35_react-dom@18.2.0_react@18.2.0__react@18.2.0_redux@4.2.1/node_modules/react-redux/es/components/context.d.ts","../../node_modules/.pnpm/react-redux@8.0.5_@types+react-dom@16.9.8_@types+react@16.9.35_react-dom@18.2.0_react@18.2.0__react@18.2.0_redux@4.2.1/node_modules/react-redux/es/components/provider.d.ts","../../node_modules/.pnpm/@types+hoist-non-react-statics@3.3.1/node_modules/@types/hoist-non-react-statics/index.d.ts","../../node_modules/.pnpm/react-redux@8.0.5_@types+react-dom@16.9.8_@types+react@16.9.35_react-dom@18.2.0_react@18.2.0__react@18.2.0_redux@4.2.1/node_modules/react-redux/es/types.d.ts","../../node_modules/.pnpm/react-redux@8.0.5_@types+react-dom@16.9.8_@types+react@16.9.35_react-dom@18.2.0_react@18.2.0__react@18.2.0_redux@4.2.1/node_modules/react-redux/es/connect/selectorfactory.d.ts","../../node_modules/.pnpm/@types+use-sync-external-store@0.0.3/node_modules/@types/use-sync-external-store/index.d.ts","../../node_modules/.pnpm/@types+use-sync-external-store@0.0.3/node_modules/@types/use-sync-external-store/with-selector.d.ts","../../node_modules/.pnpm/react-redux@8.0.5_@types+react-dom@16.9.8_@types+react@16.9.35_react-dom@18.2.0_react@18.2.0__react@18.2.0_redux@4.2.1/node_modules/react-redux/es/utils/usesyncexternalstore.d.ts","../../node_modules/.pnpm/react-redux@8.0.5_@types+react-dom@16.9.8_@types+react@16.9.35_react-dom@18.2.0_react@18.2.0__react@18.2.0_redux@4.2.1/node_modules/react-redux/es/components/connect.d.ts","../../node_modules/.pnpm/react-redux@8.0.5_@types+react-dom@16.9.8_@types+react@16.9.35_react-dom@18.2.0_react@18.2.0__react@18.2.0_redux@4.2.1/node_modules/react-redux/es/hooks/usedispatch.d.ts","../../node_modules/.pnpm/react-redux@8.0.5_@types+react-dom@16.9.8_@types+react@16.9.35_react-dom@18.2.0_react@18.2.0__react@18.2.0_redux@4.2.1/node_modules/react-redux/es/hooks/useselector.d.ts","../../node_modules/.pnpm/react-redux@8.0.5_@types+react-dom@16.9.8_@types+react@16.9.35_react-dom@18.2.0_react@18.2.0__react@18.2.0_redux@4.2.1/node_modules/react-redux/es/hooks/usestore.d.ts","../../node_modules/.pnpm/react-redux@8.0.5_@types+react-dom@16.9.8_@types+react@16.9.35_react-dom@18.2.0_react@18.2.0__react@18.2.0_redux@4.2.1/node_modules/react-redux/es/utils/shallowequal.d.ts","../../node_modules/.pnpm/react-redux@8.0.5_@types+react-dom@16.9.8_@types+react@16.9.35_react-dom@18.2.0_react@18.2.0__react@18.2.0_redux@4.2.1/node_modules/react-redux/es/exports.d.ts","../../node_modules/.pnpm/react-redux@8.0.5_@types+react-dom@16.9.8_@types+react@16.9.35_react-dom@18.2.0_react@18.2.0__react@18.2.0_redux@4.2.1/node_modules/react-redux/es/index.d.ts","../../index.d.ts","./sample-react-redux-usage.tsx","./sample-usage.tsx"],"fileInfos":["d5989fd19a90632be70bb582dce051c9",{"version":"16934abaab7026ac114da441aabea1a0","affectsGlobalScope":true,"impliedNodeFormat":1},"d4306fb2e47f74835e8674ffac07d76f",{"version":"aae8996e8b5684814785a42cbbefcd79","affectsGlobalScope":true,"impliedNodeFormat":1},"abad6dd56cc8caf095c165df8124d237",{"version":"2a9941db0809c9ad0e8837ed629b1dcc","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d051b93324f36bcc68d152a5ca0988cd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"926204c28cd3d073865348473ae28d2e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f25e42c801b2cb3cf2b39792006a9beb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6344b55f26a4e81d9608777dbfb877dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3c0ed28e53d3695b363e256ec1c023fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4c2761daba7f17141c25baa0821ac5da","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b87656acabd63e69379ff6ffcfe52fc7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"597469522da047a5af5222cc6989f405","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1708ea4d34dc37fadadc63ca01127e80","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"55d97a8c6fbf34a30450a7b1e5f7a298","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b612fb5cf8e5d964b92063a75207632a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f64453cbf9671f28158677fa5c43967a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"33f317af5428801f944a478d2c1e38e5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7376cd32b4c24f5e3471d538cce0a6cc","affectsGlobalScope":true,"impliedNodeFormat":1},"cdab56a98e2799503649ed9fb828354c","6ed0c2b51741b7f9a464f81ffebf1c15",{"version":"b231ecbcee7c60c29c58ecc0b3bfa420","affectsGlobalScope":true,"impliedNodeFormat":1},"eaa1fde8bf16bbb589f282c92dbe56da","6a0b6b4b392a782f2d7e9fcf18d1259f",{"version":"0139c837c4b77e8bf9ca4862b3b5b402","affectsGlobalScope":true,"impliedNodeFormat":1},"c7476a36ac17674d9e6348949a4a020f","744d549e39fb2aec18f51001adc8b7f2","a285482b1ee242199f172dd27737ada2","0c7a2d28d5e48b8d78bac1e63b1293b7","4b1d59f626811623ae04ac3f34d78970","2c5373be10f09cd4b67fc4ada58cd906","b51da9fbf09aeb13e9e40847793e2d87","5292475dc78e70eac35362920b4e776e","b139874f766ce4041d64328ecdbd883e","9578593fa99ef16544d5c98a0db00f95","cb849316fde74b6b70fe20b89a3481d5","eaae60aa7f1223634b9a2d1f7f95b222","20ac72c4b5089e0f5c020290d209afef","6f913952671301583d38d307911c92a1","215d56c4b8210fe5446cb789faed48d6","cfb792ede0cfdc3114e476f29a0735f8","1df46f12d4648e46aed5be301a7a567b","8b49fbc742068ff24482c2f6db4b34c3","494a105c55f9d709cd324beb355dfa20"],"fileIdsList":[[23],[20,21,22],[26,28,31,32,35],[23,26,27],[23,26,28],[23,26,31],[27,28,29,31,32,36,37,38,39,40],[23,26,28,31,35],[25,41],[23,26,30,36],[24],[33,34],[23,24,26,42,43],[23,43]],"options":{"composite":true,"jsx":3,"target":2,"allowSyntheticDefaultImports":true},"referencedMap":[[30,1],[24,1],[23,2],[36,3],[28,4],[29,5],[32,6],[41,7],[37,5],[38,8],[39,5],[42,9],[31,10],[25,11],[35,12],[44,13],[45,14]],"affectedFilesPendingEmit":[[44,17],[45,17]],"emitSignatures":[44,45]} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 526deaa..02fbd71 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,14 +1,14 @@ { "compilerOptions": { - "noImplicitAny": true + "allowJs": true, + "checkJs": true, + "lib": ["ES2015", "DOM"], + "module": "nodenext", + "moduleResolution": "nodenext", + "noEmit": true, + "strict": true, + "target": "ES2015", + "types": [] }, - "env": { - "browser": true, - "node": true, - "es6": true - }, - "references": [{ "path": "test/typescript" }], - "parserOptions": { - "sourceType": "module" - } + "include": ["index.js"] }