Browse Source

Update TypeScript to 3.9.3 (#1640)

Co-authored-by: tk338g <tkhazamov@wayfair.com>
Timur Khazamov 5 years ago
parent
commit
d315e3dc4d
4 changed files with 6 additions and 6 deletions
  1. 3 3
      package-lock.json
  2. 1 1
      package.json
  3. 1 1
      src/data/index.ts
  4. 1 1
      src/element/newElement.ts

+ 3 - 3
package-lock.json

@@ -18027,9 +18027,9 @@
       "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
     },
     "typescript": {
-      "version": "3.8.3",
-      "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz",
-      "integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w=="
+      "version": "3.9.3",
+      "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.3.tgz",
+      "integrity": "sha512-D/wqnB2xzNFIcoBG9FG8cXRDjiqSTbG2wd8DMZeQyJlP1vfTkIxH4GKveWaEBYySKIg+USu+E+EDIR47SqnaMQ=="
     },
     "unicode-canonical-property-names-ecmascript": {
       "version": "1.0.4",

+ 1 - 1
package.json

@@ -41,7 +41,7 @@
     "react-scripts": "3.4.1",
     "roughjs": "4.3.1",
     "socket.io-client": "2.3.0",
-    "typescript": "3.8.3"
+    "typescript": "3.9.3"
   },
   "devDependencies": {
     "@types/lodash.throttle": "4.1.6",

+ 1 - 1
src/data/index.ts

@@ -111,7 +111,7 @@ export const generateCollaborationLink = async () => {
   return `${window.location.origin}${window.location.pathname}#room=${id},${key}`;
 };
 
-const getImportedKey = (key: string, usage: string) =>
+const getImportedKey = (key: string, usage: KeyUsage) =>
   window.crypto.subtle.importKey(
     "jwk",
     {

+ 1 - 1
src/element/newElement.ts

@@ -41,7 +41,7 @@ const _newElementBase = <T extends ExcalidrawElement>(
     height = 0,
     angle = 0,
     ...rest
-  }: ElementConstructorOpts & Partial<ExcalidrawGenericElement>,
+  }: ElementConstructorOpts & Omit<Partial<ExcalidrawGenericElement>, "type">,
 ) => ({
   id: rest.id || randomId(),
   type,