changeset 2145:cc34e9b8bb97

workaround sylvester module errors from tsc
author drewp@bigasterisk.com
date Wed, 17 May 2023 18:53:58 -0700
parents 0bc66003fa47
children 09c3e7c893a7
files light9/web/lib/sylvester.d.ts package.json pnpm-lock.yaml tsconfig.json
diffstat 4 files changed, 12 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/light9/web/lib/sylvester.d.ts	Wed May 17 18:53:10 2023 -0700
+++ b/light9/web/lib/sylvester.d.ts	Wed May 17 18:53:58 2023 -0700
@@ -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 <https://github.com/StephaneAlie>
@@ -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.
--- a/package.json	Wed May 17 18:53:10 2023 -0700
+++ b/package.json	Wed May 17 18:53:58 2023 -0700
@@ -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",
--- a/pnpm-lock.yaml	Wed May 17 18:53:10 2023 -0700
+++ b/pnpm-lock.yaml	Wed May 17 18:53:58 2023 -0700
@@ -9,7 +9,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
@@ -34,7 +33,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
@@ -626,10 +624,6 @@
     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 @@
     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
 
--- a/tsconfig.json	Wed May 17 18:53:10 2023 -0700
+++ b/tsconfig.json	Wed May 17 18:53:58 2023 -0700
@@ -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
   }
 }