Parcourir la source

chore: use MappingItem type

Evan You il y a 2 ans
Parent
commit
d193666fdc
2 fichiers modifiés avec 2 ajouts et 8 suppressions
  1. 1 0
      packages/compiler-core/src/codegen.ts
  2. 1 8
      packages/global.d.ts

+ 1 - 0
packages/compiler-core/src/codegen.ts

@@ -218,6 +218,7 @@ function createCodegenContext(
       generatedLine: context.line,
       generatedLine: context.line,
       generatedColumn: context.column - 1,
       generatedColumn: context.column - 1,
       source: filename,
       source: filename,
+      // @ts-ignore it is possible to be null
       name
       name
     })
     })
   }
   }

+ 1 - 8
packages/global.d.ts

@@ -50,14 +50,7 @@ declare module 'source-map-js' {
     toJSON(): RawSourceMap
     toJSON(): RawSourceMap
     _names: Set<string>
     _names: Set<string>
     _mappings: {
     _mappings: {
-      add(mapping: {
-        originalLine: number
-        originalColumn: number
-        generatedLine: number
-        generatedColumn: number
-        source: string
-        name: string | null
-      }): void
+      add(mapping: MappingItem): void
     }
     }
   }
   }
 }
 }