diff --git a/README.md b/README.md index d15fcc4..73af828 100644 --- a/README.md +++ b/README.md @@ -6,5 +6,6 @@ To build and run the prototype, run: ``` npx tsc +echo '{"type": "module"}' > obj/package.json node obj ``` diff --git a/package.json5 b/package.json5 index 874d5e3..9cfd021 100644 --- a/package.json5 +++ b/package.json5 @@ -18,6 +18,8 @@ url: 'https://code.studioinfinity.org/glen/typocomath.git', }, devDependencies: { - typescript: '^4.9.3', + '@types/node': '^20.5.0', + 'source-map': '^0.7.4', + typescript: '^5.1.6', }, } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 095704b..682e112 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,15 +1,33 @@ -lockfileVersion: 5.4 +lockfileVersion: '6.0' -specifiers: - typescript: ^4.9.3 +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false devDependencies: - typescript: 4.9.3 + '@types/node': + specifier: ^20.5.0 + version: 20.5.0 + source-map: + specifier: ^0.7.4 + version: 0.7.4 + typescript: + specifier: ^5.1.6 + version: 5.1.6 packages: - /typescript/4.9.3: - resolution: {integrity: sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==} - engines: {node: '>=4.2.0'} + /@types/node@20.5.0: + resolution: {integrity: sha512-Mgq7eCtoTjT89FqNoTzzXg2XvCi5VMhRV6+I2aYanc6kQCBImeNaAYRs/DyoVqk1YEUJK5gN9VO7HRIdz4Wo3Q==} + dev: true + + /source-map@0.7.4: + resolution: {integrity: sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==} + engines: {node: '>= 8'} + dev: true + + /typescript@5.1.6: + resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} + engines: {node: '>=14.17'} hasBin: true dev: true diff --git a/src/generic/arithmetic.ts b/src/generic/arithmetic.ts index 78ad57d..6f4e949 100644 --- a/src/generic/arithmetic.ts +++ b/src/generic/arithmetic.ts @@ -3,3 +3,5 @@ import type {Dependencies, Signature} from '../interfaces/type.js' export const square = (dep: Dependencies<'multiply', T>): Signature<'square', T> => z => dep.multiply(z, z) + // z => dep.fooBar(z, z) // fails as desired + // z => dep.multiply(z, 'foo') // fails as desired diff --git a/tsconfig.json b/tsconfig.json index aae3a94..b45999b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "target": "ES2022", "rootDir": "./src", - "outDir": "./obj" + "outDir": "./obj", + "moduleResolution": "nodenext" } }