# HG changeset patch # User drewp@bigasterisk.com # Date 2023-05-18 01:53:58 # Node ID cc34e9b8bb9705c22e468d9657622dfa27f11a78 # Parent 0bc66003fa47da8e1b273da55958217aaaf6f848 workaround sylvester module errors from tsc diff --git a/light9/web/lib/sylvester.d.ts b/light9/web/lib/sylvester.d.ts --- a/light9/web/lib/sylvester.d.ts +++ b/light9/web/lib/sylvester.d.ts @@ -1,3 +1,6 @@ +// local fixes; the DefinitelyTyped one had "is not a module" errors + + // Type definitions for sylvester 0.1.3 // Project: https://github.com/jcoglan/sylvester // Definitions by: Stephane Alie @@ -7,7 +10,7 @@ // Vector and Matrix mathematics modules for JavaScript // Copyright (c) 2007 James Coglan -declare module Sylvester { +export declare module Sylvester { interface VectorStatic { /** * Constructor function. diff --git a/package.json b/package.json --- a/package.json +++ b/package.json @@ -17,7 +17,6 @@ "@types/n3": "^1.10.4", "@types/node": "^20.2.0", "@types/reconnectingwebsocket": "^1.0.7", - "@types/sylvester": "^0.1.8", "@types/underscore": "^1.11.4", "async": "^3.2.4", "d3": "^7.8.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,7 +9,6 @@ specifiers: '@types/n3': ^1.10.4 '@types/node': ^20.2.0 '@types/reconnectingwebsocket': ^1.0.7 - '@types/sylvester': ^0.1.8 '@types/underscore': ^1.11.4 async: ^3.2.4 d3: ^7.8.4 @@ -34,7 +33,6 @@ dependencies: '@types/n3': 1.10.4 '@types/node': 20.2.0 '@types/reconnectingwebsocket': 1.0.7 - '@types/sylvester': 0.1.8 '@types/underscore': 1.11.4 async: 3.2.4 d3: 7.8.4 @@ -626,10 +624,6 @@ packages: resolution: {integrity: sha512-17pnIZsGi9P8YNp7c0ueY2WEauSxDivuFeGuMuPPJMA3qk34CnFgBHGqkxgun3HUifEuwNr8cf+9rU7vSd8i5g==} dev: false - /@types/sylvester/0.1.8: - resolution: {integrity: sha512-x1bzR4PCxvv1/9iPrbdQ15gWgP8Tp8EPjO4VLjhMijepB44BzJ/XvJavoPViSiHxlBX6NgzRgO0H+qa68lJFGA==} - dev: false - /@types/trusted-types/2.0.3: resolution: {integrity: sha512-NfQ4gyz38SL8sDNrSixxU2Os1a5xcdFxipAFxYEuLUlvU2uDwS4NUpsImcf1//SlWItCVMMLiylsxbmNMToV/g==} dev: false @@ -1126,7 +1120,7 @@ packages: dev: false /sylvester/0.0.21: - resolution: {integrity: sha1-KYexzivS84sNzio0OIiEv6RADqc=} + resolution: {integrity: sha512-yUT0ukFkFEt4nb+NY+n2ag51aS/u9UHXoZw+A4jgD77/jzZsBoSDHuqysrVCBC4CYR4TYvUJq54ONpXgDBH8tA==} engines: {node: '>=0.2.6'} dev: false diff --git a/tsconfig.json b/tsconfig.json --- a/tsconfig.json +++ b/tsconfig.json @@ -43,9 +43,11 @@ // "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */ /* Module Resolution Options */ - "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, + "baseUrl": "./" /* Base directory to resolve non-absolute module names. */, + "paths": { /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + "sylvester": ["light9/web/lib/sylvester.d.ts"] + }, // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ // "typeRoots": ["/my/proj/light9/light9/web/homepage"], /* List of folders to include type definitions from. */ // "types": [], /* Type declaration files to be included in compilation. */ @@ -66,6 +68,7 @@ /* Advanced Options */ "skipLibCheck": true, /* Skip type checking of declaration files. */ - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ + "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ + "useDefineForClassFields": false } }