|
|
|
@ -1,5 +1,3 @@
|
|
|
|
|
import { encode as sourcemap_encode } from "sourcemap-codec";
|
|
|
|
|
|
|
|
|
|
type MappingSegment =
|
|
|
|
|
| [number]
|
|
|
|
|
| [number, number, number, number]
|
|
|
|
@ -65,15 +63,6 @@ export class StringWithSourcemap {
|
|
|
|
|
this.map = map;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get_sourcemap() {
|
|
|
|
|
return {
|
|
|
|
|
version: 3,
|
|
|
|
|
sources: this.map.sources.slice(),
|
|
|
|
|
names: this.map.names.slice(),
|
|
|
|
|
mappings: sourcemap_encode(this.map.mappings as any)
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
concat(other: StringWithSourcemap): StringWithSourcemap {
|
|
|
|
|
// noop: if one is empty, return the other
|
|
|
|
|
if (this.string == '') return other;
|
|
|
|
|