@volar/source-map
Last updated 4 years ago by johnsoncodehk .
Original npm · Tarball · package.json
$ npm install @volar/source-map 
SYNC missed versions from official npm registry.

@volar/source-map

Provides functionality related to source maps.

API

This package exports a SourceMap class with the following methods:

  • getSourceOffset(generatedOffset: number): Returns the source offset for a given generated offset.

  • getGeneratedOffset(sourceOffset: number): Returns the generated offset for a given source offset.

  • getSourceOffsets(generatedOffset: number): Returns all source offsets for a given generated offset.

  • getGeneratedOffsets(sourceOffset: number): Returns all generated offsets for a given source offset.

Data Structures

Mapping

The Mapping is a tuple that represents a mapping in the source map. It consists of the following elements:

  • source: A string representing the source file. This can be undefined.
  • sourceOffsets: Offsets in the source code.
  • generatedOffsets: Offsets in the generated code.
  • data: The data associated with this mapping. The type of this data is generic and can be specified when creating a SourceMap instance.

Here is an example of a Mapping:

let mapping: Mapping<MyDataType> = {
    source: '.../sourceFile.ts',
    sourceOffsets: [10],
    generatedOffsets: [30],
	lengths: [10],
    data: myData,
};

In this example, myData is of type MyDataType, which is the type specified for the SourceMap instance.

Remember to replace MyDataType and myData with actual types and data that are relevant to your project.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Current Tags

  • 2.0.0-alpha.12                                ...           @volar/language-core@2.0.0-alpha.12 (a year ago)
  • 2.4.10                                ...           latest (7 days ago)
  • 2.4.0-alpha.20                                ...           next (3 months ago)

396 Versions

  • 2.4.10                                ...           7 days ago
  • 2.4.9                                ...           9 days ago
  • 2.4.8                                ...           20 days ago
  • 2.4.7                                ...           21 days ago
  • 2.4.6                                ...           a month ago
  • 2.4.5                                ...           2 months ago
  • 2.4.4                                ...           2 months ago
  • 2.4.3                                ...           2 months ago
  • 2.4.2                                ...           2 months ago
  • 2.4.1                                ...           3 months ago
  • 2.4.0-alpha.20                                ...           3 months ago
  • 2.4.0                                ...           3 months ago
  • 2.4.0-alpha.19                                ...           3 months ago
  • 2.4.0-alpha.18                                ...           4 months ago
  • 2.4.0-alpha.17                                ...           4 months ago
  • 2.4.0-alpha.16                                ...           4 months ago
  • 2.4.0-alpha.15                                ...           4 months ago
  • 2.4.0-alpha.14                                ...           4 months ago
  • 2.4.0-alpha.13                                ...           4 months ago
  • 2.4.0-alpha.12                                ...           4 months ago
  • 2.4.0-alpha.11                                ...           4 months ago
  • 2.4.0-alpha.10                                ...           4 months ago
  • 2.4.0-alpha.9                                ...           4 months ago
  • 2.4.0-alpha.8                                ...           4 months ago
  • 2.4.0-alpha.7                                ...           4 months ago
  • 2.4.0-alpha.6                                ...           4 months ago
  • 2.4.0-alpha.5                                ...           4 months ago
  • 2.4.0-alpha.4                                ...           4 months ago
  • 2.4.0-alpha.3                                ...           4 months ago
  • 2.4.0-alpha.2                                ...           5 months ago
  • 2.4.0-alpha.1                                ...           5 months ago
  • 2.4.0-alpha.0                                ...           5 months ago
  • 2.3.5-alpha.2                                ...           5 months ago
  • 2.3.5-alpha.1                                ...           5 months ago
  • 2.3.4                                ...           5 months ago
  • 2.3.3                                ...           5 months ago
  • 2.3.2                                ...           5 months ago
  • 2.3.1                                ...           5 months ago
  • 2.3.0                                ...           5 months ago
  • 2.3.0-alpha.15                                ...           5 months ago
  • 2.3.0-alpha.14                                ...           5 months ago
  • 2.3.0-alpha.13                                ...           5 months ago
  • 2.3.0-alpha.12                                ...           5 months ago
  • 2.3.0-alpha.11                                ...           5 months ago
  • 2.3.0-alpha.10                                ...           5 months ago
  • 2.3.0-alpha.9                                ...           5 months ago
  • 2.3.0-alpha.8                                ...           5 months ago
  • 2.3.0-alpha.7                                ...           5 months ago
  • 2.3.0-alpha.6                                ...           5 months ago
  • 2.3.0-alpha.5                                ...           5 months ago
  • 2.3.0-alpha.4                                ...           5 months ago
  • 2.3.0-alpha.3                                ...           5 months ago
  • 2.3.0-alpha.2                                ...           6 months ago
  • 2.3.0-alpha.1                                ...           6 months ago
  • 2.3.0-alpha.0                                ...           6 months ago
  • 2.2.5                                ...           6 months ago
  • 2.2.4                                ...           6 months ago
  • 2.2.3                                ...           6 months ago
  • 2.2.2                                ...           6 months ago
  • 2.2.1                                ...           6 months ago
  • 2.2.0                                ...           6 months ago
  • 2.2.0-alpha.12                                ...           7 months ago
  • 2.2.0-alpha.11                                ...           7 months ago
  • 2.2.0-alpha.10                                ...           7 months ago
  • 2.2.0-alpha.9                                ...           7 months ago
  • 2.2.0-alpha.8                                ...           7 months ago
  • 2.2.0-alpha.7                                ...           7 months ago
  • 2.2.0-alpha.6                                ...           7 months ago
  • 2.2.0-alpha.5                                ...           7 months ago
  • 2.2.0-alpha.4                                ...           7 months ago
  • 2.2.0-alpha.3                                ...           7 months ago
  • 2.2.0-alpha.2                                ...           8 months ago
  • 2.2.0-alpha.1                                ...           8 months ago
  • 2.1.6                                ...           8 months ago
  • 2.2.0-alpha.0                                ...           8 months ago
  • 2.1.5                                ...           8 months ago
  • 2.1.4                                ...           8 months ago
  • 2.1.3                                ...           8 months ago
  • 2.1.2                                ...           8 months ago
  • 2.1.1                                ...           8 months ago
  • 2.1.0                                ...           9 months ago
  • 2.0.4                                ...           9 months ago
  • 2.0.3                                ...           9 months ago
  • 2.0.2                                ...           9 months ago
  • 2.0.1                                ...           9 months ago
  • 2.0.0                                ...           10 months ago
  • 2.0.0-alpha.14                                ...           10 months ago
  • 2.0.0-alpha.13                                ...           a year ago
  • 2.0.0-alpha.12                                ...           a year ago
  • 2.0.0-alpha.11                                ...           a year ago
  • 2.0.0-alpha.10                                ...           a year ago
  • 2.0.0-alpha.9                                ...           a year ago
  • 2.0.0-alpha.8                                ...           a year ago
  • 2.0.0-alpha.7                                ...           a year ago
  • 2.0.0-alpha.6                                ...           a year ago
  • 2.0.0-alpha.5                                ...           a year ago
  • 2.0.0-alpha.4                                ...           a year ago
  • 2.0.0-alpha.3                                ...           a year ago
  • 2.0.0-alpha.2                                ...           a year ago
  • 2.0.0-alpha.1                                ...           a year ago
  • 2.0.0-alpha.0                                ...           a year ago
  • 1.11.1                                ...           a year ago
  • 1.11.0                                ...           a year ago
  • 1.10.10                                ...           a year ago
  • 1.10.10-alpha.1                                ...           a year ago
  • 1.10.10-alpha.0                                ...           a year ago
  • 1.10.9                                ...           a year ago
  • 1.10.8                                ...           a year ago
  • 1.10.7                                ...           a year ago
  • 1.10.6                                ...           a year ago
  • 1.10.5                                ...           a year ago
  • 1.10.4                                ...           a year ago
  • 1.10.3                                ...           a year ago
  • 1.10.2                                ...           a year ago
  • 1.10.1                                ...           a year ago
  • 1.10.0                                ...           a year ago
  • 1.9.2                                ...           a year ago
  • 1.9.1                                ...           a year ago
  • 1.9.0                                ...           a year ago
  • 1.8.3                                ...           a year ago
  • 1.8.2                                ...           a year ago
  • 1.8.1                                ...           a year ago
  • 1.8.0                                ...           a year ago
  • 1.7.10                                ...           a year ago
  • 1.7.9                                ...           a year ago
  • 1.7.8                                ...           a year ago
  • 1.7.7                                ...           a year ago
  • 1.7.6                                ...           a year ago
  • 1.7.5                                ...           a year ago
  • 1.7.4                                ...           a year ago
  • 1.7.3                                ...           a year ago
  • 1.7.2                                ...           a year ago
  • 1.7.1                                ...           a year ago
  • 1.7.0                                ...           a year ago
  • 1.6.9                                ...           a year ago
  • 1.6.8                                ...           a year ago
  • 1.6.7                                ...           a year ago
  • 1.6.6                                ...           a year ago
  • 1.6.5                                ...           a year ago
  • 1.6.4                                ...           a year ago
  • 1.6.3                                ...           2 years ago
  • 1.6.2                                ...           2 years ago
  • 1.6.1                                ...           2 years ago
  • 1.6.0                                ...           2 years ago
  • 1.5.4                                ...           2 years ago
  • 1.5.3                                ...           2 years ago
  • 1.5.2                                ...           2 years ago
  • 1.5.1                                ...           2 years ago
  • 1.5.0                                ...           2 years ago
  • 1.5.0-alpha.0                                ...           2 years ago
  • 1.4.1                                ...           2 years ago
  • 1.4.0                                ...           2 years ago
  • 1.4.0-alpha.12                                ...           2 years ago
  • 1.4.0-alpha.11                                ...           2 years ago
  • 1.4.0-alpha.10                                ...           2 years ago
  • 1.4.0-alpha.9                                ...           2 years ago
  • 1.4.0-alpha.8                                ...           2 years ago
  • 1.4.0-alpha.7                                ...           2 years ago
  • 1.4.0-alpha.6                                ...           2 years ago
  • 1.4.0-alpha.5                                ...           2 years ago
  • 1.4.0-alpha.4                                ...           2 years ago
  • 1.4.0-alpha.3                                ...           2 years ago
  • 1.4.0-alpha.2                                ...           2 years ago
  • 1.4.0-alpha.1                                ...           2 years ago
  • 1.4.0-alpha.0                                ...           2 years ago
  • 1.3.0-alpha.3                                ...           2 years ago
  • 1.3.0-alpha.2                                ...           2 years ago
  • 1.3.0-alpha.1                                ...           2 years ago
  • 1.3.0-alpha.0                                ...           2 years ago
  • 1.2.0-alpha.19                                ...           2 years ago
  • 1.2.0-alpha.18                                ...           2 years ago
  • 1.2.0-alpha.17                                ...           2 years ago
  • 1.2.0-alpha.16                                ...           2 years ago
  • 1.2.0-alpha.15                                ...           2 years ago
  • 1.2.0-alpha.14                                ...           2 years ago
  • 1.2.0-alpha.13                                ...           2 years ago
  • 1.2.0-alpha.12                                ...           2 years ago
  • 1.2.0-alpha.11                                ...           2 years ago
  • 1.2.0-alpha.10                                ...           2 years ago
  • 1.2.0-alpha.9                                ...           2 years ago
  • 1.2.0-alpha.8                                ...           2 years ago
  • 1.2.0-alpha.7                                ...           2 years ago
  • 1.2.0-alpha.6                                ...           2 years ago
  • 1.2.0-alpha.5                                ...           2 years ago
  • 1.2.0-alpha.4                                ...           2 years ago
  • 1.2.0-alpha.3                                ...           2 years ago
  • 1.2.0-alpha.2                                ...           2 years ago
  • 1.2.0-alpha.1                                ...           2 years ago
  • 1.1.0-1.2.0-alpha.1.0                                ...           2 years ago
  • 1.1.0-alpha.2                                ...           2 years ago
  • 1.1.0-alpha.1                                ...           2 years ago
  • 1.1.0-alpha.0                                ...           2 years ago
  • 1.0.24                                ...           2 years ago
  • 1.0.22                                ...           2 years ago
  • 1.0.21                                ...           2 years ago
  • 1.0.20                                ...           2 years ago
  • 1.0.19                                ...           2 years ago
  • 1.0.18                                ...           2 years ago
  • 1.0.17                                ...           2 years ago
  • 1.0.16                                ...           2 years ago
  • 1.0.14                                ...           2 years ago
  • 1.0.13                                ...           2 years ago
  • 1.0.12                                ...           2 years ago
  • 1.0.11                                ...           2 years ago
  • 1.0.10                                ...           2 years ago
  • 1.0.9                                ...           2 years ago
  • 1.0.8                                ...           2 years ago
  • 1.0.7                                ...           2 years ago
  • 1.0.6                                ...           2 years ago
  • 1.0.5                                ...           2 years ago
  • 1.0.4                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 1.0.0-rc.5                                ...           2 years ago
  • 1.0.0-rc.4                                ...           2 years ago
  • 1.0.0-rc.3                                ...           2 years ago
  • 1.0.0-rc.2                                ...           2 years ago
  • 1.0.0-rc.1                                ...           2 years ago
  • 1.0.0-rc.0                                ...           2 years ago
  • 1.0.0-beta.8                                ...           2 years ago
  • 1.0.0-beta.7                                ...           2 years ago
  • 1.0.0-beta.6                                ...           2 years ago
  • 1.0.0-beta.5                                ...           2 years ago
  • 1.0.0-beta.4                                ...           2 years ago
  • 1.0.0-beta.3                                ...           2 years ago
  • 1.0.0-beta.2                                ...           2 years ago
  • 1.0.0-beta.1                                ...           2 years ago
  • 1.0.0-beta.0                                ...           2 years ago
  • 1.0.0-alpha.5                                ...           2 years ago
  • 1.0.0-alpha.4                                ...           2 years ago
  • 1.0.0-alpha.3                                ...           2 years ago
  • 1.0.0-alpha.2                                ...           2 years ago
  • 1.0.0-alpha.1                                ...           2 years ago
  • 1.0.0-alpha.0                                ...           2 years ago
  • 0.40.13                                ...           2 years ago
  • 0.40.12                                ...           2 years ago
  • 0.40.11                                ...           2 years ago
  • 0.40.10                                ...           2 years ago
  • 0.40.9                                ...           2 years ago
  • 0.40.8                                ...           2 years ago
  • 0.40.7                                ...           2 years ago
  • 0.40.6                                ...           2 years ago
  • 0.40.5                                ...           2 years ago
  • 0.40.4                                ...           2 years ago
  • 0.40.3                                ...           2 years ago
  • 0.40.2                                ...           2 years ago
  • 0.40.1                                ...           2 years ago
  • 0.40.0                                ...           2 years ago
  • 0.39.5                                ...           2 years ago
  • 0.39.4                                ...           2 years ago
  • 0.39.3                                ...           2 years ago
  • 0.39.2                                ...           2 years ago
  • 0.39.0                                ...           2 years ago
  • 0.38.9                                ...           2 years ago
  • 0.38.8                                ...           2 years ago
  • 0.38.7                                ...           2 years ago
  • 0.38.5                                ...           2 years ago
  • 0.38.4                                ...           2 years ago
  • 0.38.3                                ...           2 years ago
  • 0.38.2                                ...           2 years ago
  • 0.38.1                                ...           2 years ago
  • 0.38.0                                ...           2 years ago
  • 0.37.9                                ...           2 years ago
  • 0.37.8                                ...           2 years ago
  • 0.37.7                                ...           2 years ago
  • 0.37.5                                ...           2 years ago
  • 0.37.4                                ...           2 years ago
  • 0.37.3                                ...           2 years ago
  • 0.37.2                                ...           2 years ago
  • 0.37.1                                ...           2 years ago
  • 0.37.0                                ...           2 years ago
  • 0.36.1                                ...           2 years ago
  • 0.36.0                                ...           2 years ago
  • 0.35.2                                ...           2 years ago
  • 0.35.1                                ...           2 years ago
  • 0.35.0                                ...           2 years ago
  • 0.34.17                                ...           2 years ago
  • 0.34.16                                ...           2 years ago
  • 0.34.15                                ...           3 years ago
  • 0.34.13                                ...           3 years ago
  • 0.34.12                                ...           3 years ago
  • 0.34.11                                ...           3 years ago
  • 0.34.10                                ...           3 years ago
  • 0.34.9                                ...           3 years ago
  • 0.34.8                                ...           3 years ago
  • 0.34.7                                ...           3 years ago
  • 0.34.6                                ...           3 years ago
  • 0.34.5                                ...           3 years ago
  • 0.34.4                                ...           3 years ago
  • 0.34.3                                ...           3 years ago
  • 0.34.2                                ...           3 years ago
  • 0.34.1                                ...           3 years ago
  • 0.34.0                                ...           3 years ago
  • 0.33.9                                ...           3 years ago
  • 0.33.7                                ...           3 years ago
  • 0.33.6                                ...           3 years ago
  • 0.33.5                                ...           3 years ago
  • 0.33.4                                ...           3 years ago
  • 0.33.3                                ...           3 years ago
  • 0.33.2                                ...           3 years ago
  • 0.33.1                                ...           3 years ago
  • 0.33.0                                ...           3 years ago
  • 0.32.1                                ...           3 years ago
  • 0.32.0                                ...           3 years ago
  • 0.31.4                                ...           3 years ago
  • 0.31.3                                ...           3 years ago
  • 0.31.2                                ...           3 years ago
  • 0.31.1                                ...           3 years ago
  • 0.31.0                                ...           3 years ago
  • 0.30.6                                ...           3 years ago
  • 0.30.5                                ...           3 years ago
  • 0.30.4                                ...           3 years ago
  • 0.30.3                                ...           3 years ago
  • 0.30.2                                ...           3 years ago
  • 0.30.1                                ...           3 years ago
  • 0.30.0                                ...           3 years ago
  • 0.29.8                                ...           3 years ago
  • 0.29.7                                ...           3 years ago
  • 0.29.6                                ...           3 years ago
  • 0.29.5                                ...           3 years ago
  • 0.29.4                                ...           3 years ago
  • 0.29.3                                ...           3 years ago
  • 0.29.2                                ...           3 years ago
  • 0.29.1                                ...           3 years ago
  • 0.29.0                                ...           3 years ago
  • 0.28.10                                ...           3 years ago
  • 0.28.9                                ...           3 years ago
  • 0.28.8                                ...           3 years ago
  • 0.28.7                                ...           3 years ago
  • 0.28.6                                ...           3 years ago
  • 0.28.5                                ...           3 years ago
  • 0.28.4                                ...           3 years ago
  • 0.28.3                                ...           3 years ago
  • 0.28.2                                ...           3 years ago
  • 0.28.1                                ...           3 years ago
  • 0.28.0                                ...           3 years ago
  • 0.27.24                                ...           3 years ago
  • 0.27.22                                ...           3 years ago
  • 0.27.14                                ...           3 years ago
  • 0.27.13                                ...           3 years ago
  • 0.27.12                                ...           3 years ago
  • 0.27.11                                ...           3 years ago
  • 0.27.10                                ...           3 years ago
  • 0.27.9                                ...           3 years ago
  • 0.27.8                                ...           3 years ago
  • 0.27.7                                ...           3 years ago
  • 0.27.6                                ...           3 years ago
  • 0.27.5                                ...           3 years ago
  • 0.27.4                                ...           3 years ago
  • 0.27.3                                ...           3 years ago
  • 0.27.2                                ...           3 years ago
  • 0.27.1                                ...           3 years ago
  • 0.27.0                                ...           3 years ago
  • 0.26.16                                ...           3 years ago
  • 0.26.15                                ...           3 years ago
  • 0.26.14                                ...           3 years ago
  • 0.26.13                                ...           3 years ago
  • 0.26.12                                ...           3 years ago
  • 0.26.11                                ...           3 years ago
  • 0.26.10                                ...           3 years ago
  • 0.26.9                                ...           3 years ago
  • 0.26.8                                ...           3 years ago
  • 0.26.7                                ...           3 years ago
  • 0.26.6                                ...           3 years ago
  • 0.26.6-alpha.0                                ...           3 years ago
  • 0.26.5                                ...           3 years ago
  • 0.26.4                                ...           3 years ago
  • 0.26.3                                ...           3 years ago
  • 0.26.2                                ...           3 years ago
  • 0.26.1                                ...           3 years ago
  • 0.26.0                                ...           3 years ago
  • 0.25.29-0.26.0-alpha.1.0                                ...           3 years ago
  • 0.26.0-alpha.0                                ...           3 years ago
  • 0.25.28                                ...           3 years ago
  • 0.25.27                                ...           3 years ago
  • 0.25.26                                ...           3 years ago
  • 0.25.25                                ...           3 years ago
  • 0.25.24                                ...           3 years ago
  • 0.25.23                                ...           3 years ago
  • 0.25.22                                ...           3 years ago
  • 0.25.21                                ...           3 years ago
  • 0.25.20                                ...           3 years ago
  • 0.25.19                                ...           3 years ago
  • 0.25.18                                ...           3 years ago
  • 0.25.17                                ...           3 years ago
  • 0.25.16                                ...           3 years ago
  • 0.25.15                                ...           3 years ago
  • 0.25.14                                ...           3 years ago
  • 0.25.4                                ...           4 years ago
  • 0.25.3                                ...           4 years ago
  • 0.25.2                                ...           4 years ago
  • 0.25.1                                ...           4 years ago
  • 0.25.0                                ...           4 years ago
  • 0.25.0-alpha.0                                ...           4 years ago

© 2010 - cnpmjs.org x YWFE | Home | YWFE