From a24809fbd24a0d538dfddb6ee9d085efb206249b Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Mon, 26 Feb 2024 09:37:05 +0800 Subject: [PATCH] chore: limit typescript lib to es2016 (#10164) * chore: limit typescript lib to es2015 * chore: set target to es2015 * chore: update --- 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 953765dd1d..76841d2a8f 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 f47b7fc8eb..6ba420775f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,7 +18,7 @@ "esModuleInterop": true, "removeComments": false, "jsx": "preserve", - "lib": ["esnext", "dom"], + "lib": ["es2016", "dom"], "types": ["vitest/globals", "puppeteer", "node"], "rootDir": ".", "paths": { -- 2.47.2