Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Commit 1af1f40

Browse files
committed
fix(compiler-vapor): TS error
1 parent 98b701c commit 1af1f40

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

packages/compiler-vapor/src/generate.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type {
22
CodegenOptions as BaseCodegenOptions,
33
BaseCodegenResult,
4+
CodegenSourceMapGenerator,
45
} from '@vue/compiler-dom'
56
import type { IREffect, RootIRNode, VaporHelper } from './ir'
67
import { SourceMapGenerator } from 'source-map-js'
@@ -24,7 +25,7 @@ export class CodegenContext {
2425
options: Required<CodegenOptions>
2526

2627
code: CodeFragment[]
27-
map?: SourceMapGenerator
28+
map?: CodegenSourceMapGenerator
2829
push: (...args: CodeFragment[]) => void
2930

3031
helpers = new Set<string>([])
@@ -93,7 +94,8 @@ export class CodegenContext {
9394
} = this
9495
if (!__BROWSER__ && sourceMap) {
9596
// lazy require source-map implementation, only in non-browser builds
96-
this.map = new SourceMapGenerator()
97+
this.map =
98+
new SourceMapGenerator() as unknown as CodegenSourceMapGenerator
9799
this.map.setSourceContent(filename, ir.source)
98100
this.map._sources.add(filename)
99101
}

packages/compiler-vapor/src/generators/utils.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ export function genCodeFragment(context: CodegenContext) {
148148
generatedLine: pos.line,
149149
generatedColumn: pos.column - 1,
150150
source: context.options.filename,
151-
// @ts-expect-error it is possible to be null
152151
name,
153152
})
154153
}

scripts/release.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,6 @@ async function isInSyncWithRemote() {
413413
console.error(
414414
pico.red('Failed to check whether local HEAD is up-to-date with remote.'),
415415
)
416-
console.error(e)
417416
return false
418417
}
419418
}

0 commit comments

Comments
 (0)