From d0d3ad68237754fc51250477046adad0c7899ce6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Sat, 20 Jan 2024 21:02:21 +0800 Subject: [PATCH 1/3] chore: limit typescript lib to es2015 --- packages/reactivity/__tests__/gc.spec.ts | 1 + tsconfig.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/reactivity/__tests__/gc.spec.ts b/packages/reactivity/__tests__/gc.spec.ts index 953765dd1d9..76841d2a8ff 100644 --- a/packages/reactivity/__tests__/gc.spec.ts +++ b/packages/reactivity/__tests__/gc.spec.ts @@ -21,6 +21,7 @@ describe.skipIf(!global.gc)('reactivity/gc', () => { // #9233 it('should release computed cache', async () => { const src = ref<{} | undefined>({}) + // @ts-expect-error ES2021 API const srcRef = new WeakRef(src.value!) let c: ComputedRef | undefined = computed(() => src.value) diff --git a/tsconfig.json b/tsconfig.json index f47b7fc8eb9..e92c974acbc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,7 +18,7 @@ "esModuleInterop": true, "removeComments": false, "jsx": "preserve", - "lib": ["esnext", "dom"], + "lib": ["es2015", "dom"], "types": ["vitest/globals", "puppeteer", "node"], "rootDir": ".", "paths": { From b738a00ef324d2600753ff7a5be3a35d0712278c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Wed, 7 Feb 2024 18:31:26 +0800 Subject: [PATCH 2/3] chore: set target to es2015 --- tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index e92c974acbc..aa1ed9f846e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,7 @@ "baseUrl": ".", "outDir": "temp", "sourceMap": false, - "target": "es2016", + "target": "es2015", "newLine": "LF", "useDefineForClassFields": false, "module": "esnext", From 90ccec6121a8d9a9172c88012da16e65d9a4bd7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Sun, 11 Feb 2024 20:48:11 +0800 Subject: [PATCH 3/3] chore: update --- tsconfig.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index aa1ed9f846e..6ba420775f7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,7 @@ "baseUrl": ".", "outDir": "temp", "sourceMap": false, - "target": "es2015", + "target": "es2016", "newLine": "LF", "useDefineForClassFields": false, "module": "esnext", @@ -18,7 +18,7 @@ "esModuleInterop": true, "removeComments": false, "jsx": "preserve", - "lib": ["es2015", "dom"], + "lib": ["es2016", "dom"], "types": ["vitest/globals", "puppeteer", "node"], "rootDir": ".", "paths": {