@cspell/cspell-types 6.1.0-alpha.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/TextOffset.d.ts +21 -0
- package/package.json +2 -2
package/dist/TextOffset.d.ts
CHANGED
|
@@ -20,4 +20,25 @@ export interface TextDocumentOffset extends TextOffset {
|
|
|
20
20
|
col: number;
|
|
21
21
|
line: TextOffset;
|
|
22
22
|
}
|
|
23
|
+
export interface Mapped {
|
|
24
|
+
/**
|
|
25
|
+
* `(i, j)` number pairs where
|
|
26
|
+
* - `i` is the offset in the source
|
|
27
|
+
* - `j` is the offset in the destination
|
|
28
|
+
*
|
|
29
|
+
* Example:
|
|
30
|
+
* - source text = `"caf\xe9"`
|
|
31
|
+
* - mapped text = `"café"`
|
|
32
|
+
* - map = `[3, 3, 7, 4]`, which is equivalent to `[0, 0, 3, 3, 7, 4]`
|
|
33
|
+
* where the `[0, 0]` is unnecessary.
|
|
34
|
+
*
|
|
35
|
+
*/
|
|
36
|
+
map: number[];
|
|
37
|
+
}
|
|
38
|
+
export interface TransformedText extends Partial<Mapped> {
|
|
39
|
+
/**
|
|
40
|
+
* Transformed text with an optional map.
|
|
41
|
+
*/
|
|
42
|
+
text: string;
|
|
43
|
+
}
|
|
23
44
|
//# sourceMappingURL=TextOffset.d.ts.map
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "6.1.0
|
|
6
|
+
"version": "6.1.0",
|
|
7
7
|
"description": "Types for cspell and cspell-lib",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"typings": "dist/index.d.ts",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"ts-json-schema-generator": "^1.0.0",
|
|
54
54
|
"typescript": "^4.7.2"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "eaf6991ced2c8eb2c60bd2914095e4c686a4266b"
|
|
57
57
|
}
|