@volar/code-gen
Advanced tools
Comparing version 0.37.4 to 0.37.5
@@ -1,2 +0,2 @@ | ||
import type { Mapping, Mode, Range } from '@volar/source-map'; | ||
import { Mapping, Mode, Range } from '@volar/source-map'; | ||
export declare class CodeGen<T = undefined> { | ||
@@ -11,2 +11,6 @@ private text; | ||
}; | ||
addCode2(str: string, sourceOffset: number, data: T): { | ||
start: number; | ||
end: number; | ||
}; | ||
addMapping(str: string, sourceRange: Range, mode: Mode, data: T): { | ||
@@ -13,0 +17,0 @@ start: number; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.mergeCodeGen = exports.CodeGen = void 0; | ||
const source_map_1 = require("@volar/source-map"); | ||
class CodeGen { | ||
@@ -35,2 +36,15 @@ constructor() { | ||
} | ||
addCode2(str, sourceOffset, data) { | ||
const targetRange = this.addText(str); | ||
this.addMapping2({ | ||
mappedRange: targetRange, | ||
sourceRange: { | ||
start: sourceOffset, | ||
end: sourceOffset + str.length, | ||
}, | ||
mode: source_map_1.Mode.Offset, | ||
data, | ||
}); | ||
return targetRange; | ||
} | ||
addMapping(str, sourceRange, mode, data) { | ||
@@ -37,0 +51,0 @@ const targetRange = { |
{ | ||
"name": "@volar/code-gen", | ||
"version": "0.37.4", | ||
"version": "0.37.5", | ||
"main": "out/index.js", | ||
@@ -16,5 +16,5 @@ "license": "MIT", | ||
"dependencies": { | ||
"@volar/source-map": "0.37.4" | ||
"@volar/source-map": "0.37.5" | ||
}, | ||
"gitHead": "ff43db17137f334dc1664b6a3285bc2e5ebcd9db" | ||
"gitHead": "8f24dd22d7ae476f380548706853f40de8c71b7b" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
5357
108
0
+ Added@volar/source-map@0.37.5(transitive)
- Removed@volar/source-map@0.37.4(transitive)
Updated@volar/source-map@0.37.5