Quellcode durchsuchen

chore: limit typescript lib to es2016 (#10164)

* chore: limit typescript lib to es2015

* chore: set target to es2015

* chore: update
三咲智子 Kevin Deng vor 2 Jahren
Ursprung
Commit
a24809fbd2
2 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 1 0
      packages/reactivity/__tests__/gc.spec.ts
  2. 1 1
      tsconfig.json

+ 1 - 0
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)

+ 1 - 1
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": {