mirror of https://github.com/vuejs/core.git
chore(deps): fix MappingItem type (#12891)
This commit is contained in:
parent
4a1884f8dc
commit
cbf5821028
|
@ -81,7 +81,7 @@ font-weight: bold;
|
||||||
|
|
||||||
const consumer = new SourceMapConsumer(script!.map!)
|
const consumer = new SourceMapConsumer(script!.map!)
|
||||||
consumer.eachMapping(mapping => {
|
consumer.eachMapping(mapping => {
|
||||||
expect(mapping.originalLine - mapping.generatedLine).toBe(padding)
|
expect(mapping.originalLine! - mapping.generatedLine).toBe(padding)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -100,8 +100,8 @@ font-weight: bold;
|
||||||
|
|
||||||
const consumer = new SourceMapConsumer(template.map!)
|
const consumer = new SourceMapConsumer(template.map!)
|
||||||
consumer.eachMapping(mapping => {
|
consumer.eachMapping(mapping => {
|
||||||
expect(mapping.originalLine - mapping.generatedLine).toBe(padding)
|
expect(mapping.originalLine! - mapping.generatedLine).toBe(padding)
|
||||||
expect(mapping.originalColumn - mapping.generatedColumn).toBe(2)
|
expect(mapping.originalColumn! - mapping.generatedColumn).toBe(2)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ font-weight: bold;
|
||||||
|
|
||||||
const consumer = new SourceMapConsumer(custom!.map!)
|
const consumer = new SourceMapConsumer(custom!.map!)
|
||||||
consumer.eachMapping(mapping => {
|
consumer.eachMapping(mapping => {
|
||||||
expect(mapping.originalLine - mapping.generatedLine).toBe(padding)
|
expect(mapping.originalLine! - mapping.generatedLine).toBe(padding)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -289,7 +289,7 @@ function mapLines(oldMap: RawSourceMap, newMap: RawSourceMap): RawSourceMap {
|
||||||
|
|
||||||
const origPosInOldMap = oldMapConsumer.originalPositionFor({
|
const origPosInOldMap = oldMapConsumer.originalPositionFor({
|
||||||
line: m.originalLine,
|
line: m.originalLine,
|
||||||
column: m.originalColumn,
|
column: m.originalColumn!,
|
||||||
})
|
})
|
||||||
|
|
||||||
if (origPosInOldMap.source == null) {
|
if (origPosInOldMap.source == null) {
|
||||||
|
@ -305,7 +305,7 @@ function mapLines(oldMap: RawSourceMap, newMap: RawSourceMap): RawSourceMap {
|
||||||
line: origPosInOldMap.line, // map line
|
line: origPosInOldMap.line, // map line
|
||||||
// use current column, since the oldMap produced by @vue/compiler-sfc
|
// use current column, since the oldMap produced by @vue/compiler-sfc
|
||||||
// does not
|
// does not
|
||||||
column: m.originalColumn,
|
column: m.originalColumn!,
|
||||||
},
|
},
|
||||||
source: origPosInOldMap.source,
|
source: origPosInOldMap.source,
|
||||||
name: origPosInOldMap.name,
|
name: origPosInOldMap.name,
|
||||||
|
|
Loading…
Reference in New Issue