@volar/source-map
Advanced tools
Comparing version 2.4.10 to 2.4.11
{ | ||
"name": "@volar/source-map", | ||
"version": "2.4.10", | ||
"version": "2.4.11", | ||
"license": "MIT", | ||
@@ -14,3 +14,3 @@ "files": [ | ||
}, | ||
"gitHead": "03d1e8b07e1e64921b76b635c7064d7b4fcf63b5" | ||
"gitHead": "42ccae005cc8516e07ad38f4d7730cab9b723340" | ||
} |
@@ -7,12 +7,19 @@ # @volar/source-map | ||
This package exports a `SourceMap` class with the following methods: | ||
### This package exports a `SourceMap` class with the following methods: | ||
- `getSourceOffset(generatedOffset: number)`: Returns the source offset for a given generated offset. | ||
Params: | ||
- `getGeneratedOffset(sourceOffset: number)`: Returns the generated offset for a given source offset. | ||
- `fallbackToAnyMatch`(default: false): allow the start and end offsets to come from different mappings. | ||
- `filter?: (data: Data) => boolean)`(default: undefined): according to mapping: Mapping<MyDataType>.data, filter out offsets that do not meet the custom conditions. | ||
- `getSourceOffsets(generatedOffset: number)`: Returns all source offsets for a given generated offset. | ||
Methods: | ||
- `getGeneratedOffsets(sourceOffset: number)`: Returns all generated offsets for a given source offset. | ||
- `toSourceRange(generatedStart: number, generatedEnd: number, fallbackToAnyMatch: boolean, filter?: (data: Data) => boolean)`: Returns all source start and end offsets for the given generated start and end offsets. | ||
- `toGeneratedRange(sourceStart: number, sourceEnd: number, fallbackToAnyMatch: boolean, filter?: (data: Data) => boolean) `: Returns all generated start and end offsets for the given source start and end offsets. | ||
- `toSourceLocation(generatedOffset: number, filter?: (data: Data) => boolean)`: Returns all source offsets for a given generated offset. | ||
- `toGeneratedLocation(sourceOffset: number, filter?: (data: Data) => boolean)`: Returns all generated offsets for a given source offset. | ||
## Data Structures | ||
@@ -19,0 +26,0 @@ |
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
13808
54
3