From 7c5d1c24c4d139ec4cc954769f2dd50885c9f009 Mon Sep 17 00:00:00 2001 From: Angelo Ashmore Date: Fri, 11 Aug 2023 12:15:49 -1000 Subject: [PATCH] chore: downgrade `typescript` to ^4 --- package-lock.json | 10 +++++----- package.json | 2 +- test/types/fields-link.types.ts | 32 ++++++++++++++------------------ 3 files changed, 20 insertions(+), 24 deletions(-) diff --git a/package-lock.json b/package-lock.json index efb65405..c083a7cf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,7 +32,7 @@ "size-limit": "^8.2.6", "standard-version": "^9.5.0", "ts-expect": "^1.3.0", - "typescript": "^5.1.6", + "typescript": "^4.9.5", "vite": "^4.4.9", "vite-plugin-sdk": "^0.1.1", "vitest": "^0.34.1" @@ -7796,16 +7796,16 @@ "dev": true }, "node_modules/typescript": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", - "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=14.17" + "node": ">=4.2.0" } }, "node_modules/ufo": { diff --git a/package.json b/package.json index 8cc6e1d4..4ab81670 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "size-limit": "^8.2.6", "standard-version": "^9.5.0", "ts-expect": "^1.3.0", - "typescript": "^5.1.6", + "typescript": "^4.9.5", "vite": "^4.4.9", "vite-plugin-sdk": "^0.1.1", "vitest": "^0.34.1" diff --git a/test/types/fields-link.types.ts b/test/types/fields-link.types.ts index 2f106d74..8c50453e 100644 --- a/test/types/fields-link.types.ts +++ b/test/types/fields-link.types.ts @@ -101,16 +101,14 @@ expectType>({ tags: [], lang: "string", }); -expectType>( +expectType>({ + link_type: prismic.LinkType.Document, + id: "string", // @ts-expect-error - Document type must match the given type. - { - link_type: prismic.LinkType.Document, - id: "string", - type: "string", - tags: [], - lang: "string", - }, -); + type: "string", + tags: [], + lang: "string", +}); /** * Supports custom document language for document links. @@ -122,16 +120,14 @@ expectType>({ tags: [], lang: "fr-fr", }); -expectType>( +expectType>({ + link_type: prismic.LinkType.Document, + id: "string", + type: "string", + tags: [], // @ts-expect-error - Document language must match the given type. - { - link_type: prismic.LinkType.Document, - id: "string", - type: "string", - tags: [], - lang: "string", - }, -); + lang: "string", +}); /** * Supports custom document data for document links.