@cspell/cspell-types 10.4.0-alpha.1 → 10.4.1
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/README.md +1 -1
- package/cspell.schema.json +6 -6
- package/dist/Parser/index.d.mts +1 -1
- package/dist/Parser/index.d.ts +1 -1
- package/dist/{index-eOBgsj8d.d.ts → index-BVAK5kk5.d.mts} +3 -11
- package/dist/{index-eOBgsj8d.d.mts → index-BVAK5kk5.d.ts} +3 -11
- package/dist/index.d.mts +25 -57
- package/dist/index.d.ts +25 -57
- package/dist/index.js +5 -10
- package/dist/index.mjs +5 -10
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ If our spell checkers save you time, please consider supporting their developmen
|
|
|
12
12
|
|
|
13
13
|
Please show your support through one of the following sites:
|
|
14
14
|
|
|
15
|
-
[](https://github.com/sponsors/streetsidesoftware)
|
|
15
|
+
[](https://github.com/sponsors/streetsidesoftware) [](https://www.paypal.com/donate/?hosted_button_id=26LNBP2Q6MKCY) [](https://opencollective.com/cspell) [](https://streetsidesoftware.com/sponsor/)
|
|
16
16
|
|
|
17
17
|
<!--- @@inject-end: ../../static/sponsor.md --->
|
|
18
18
|
|
package/cspell.schema.json
CHANGED
|
@@ -929,8 +929,8 @@
|
|
|
929
929
|
},
|
|
930
930
|
"DictionaryInformation": {
|
|
931
931
|
"additionalProperties": false,
|
|
932
|
-
"description": "
|
|
933
|
-
"markdownDescription": "
|
|
932
|
+
"description": "Provides extra information about the dictionary.\n\nIt is used to improve suggestions and casing rules.\n\nAdded with `v5.16.0`.",
|
|
933
|
+
"markdownDescription": "Provides extra information about the dictionary.\n\nIt is used to improve suggestions and casing rules.\n\nAdded with `v5.16.0`.",
|
|
934
934
|
"properties": {
|
|
935
935
|
"accents": {
|
|
936
936
|
"anyOf": [
|
|
@@ -987,8 +987,8 @@
|
|
|
987
987
|
"markdownDescription": "An optional set of characters that can possibly be removed from a word before\nchecking it.\n\nThis is useful in languages like Arabic where Harakat accents are optional.\n\nNote: All matching characters are removed or none. Partial removal is not supported."
|
|
988
988
|
},
|
|
989
989
|
"locale": {
|
|
990
|
-
"description": "The locale of the dictionary.
|
|
991
|
-
"markdownDescription": "The locale of the dictionary.\nExample: `nl
|
|
990
|
+
"description": "The locale of the dictionary.\n\nThe locale should follow the IETF BCP 47 standard. If more than one locale is specified, the first valid locale will be used for casing rules.\n\nAvoid mixing different locales in the same dictionary.\n\nExample: `nl` or `nl-BE`",
|
|
991
|
+
"markdownDescription": "The locale of the dictionary.\n\nThe locale should follow the IETF BCP 47 standard.\nIf more than one locale is specified, the first valid locale will be used for casing rules.\n\nAvoid mixing different locales in the same dictionary.\n\nExample: `nl` or `nl-BE`",
|
|
992
992
|
"type": "string"
|
|
993
993
|
},
|
|
994
994
|
"suggestionEditCosts": {
|
|
@@ -1985,8 +1985,8 @@
|
|
|
1985
1985
|
"type": "object"
|
|
1986
1986
|
},
|
|
1987
1987
|
"SoftWordBreakPattern": {
|
|
1988
|
-
"description": "Defines a word break rule based on a string.\n\nFormat:\n- `\"before|after\"` -- Matches a word break between `before` and `after`\n- `\"before|after$\"` -- Matches a word break between `before` and `after` at the end of a word\n- `\"^before|after\"` -- Matches a word break between `before` at the start of a word and `after`\n- `\"^before|after$\"` -- Matches a word break between `before` at the start of a word and `after` at the end of a word\n- `\"before|\"` -- Matches a word break after `before`\n- `\"^before|\"` -- Matches a word break after `before` at the start of a word\n- `\"|after\"` -- Matches a word break before `after`\n- `\"|after$\"` -- Matches a word break before `after` at the end of a word\n\n\nWhere `before` is the text before the word break and `after` is the text after the word break.\n\nSpecial characters like `|`, `^`, and `$` have specific meanings.\n- `|` -- Represents the position of the word break\n- `^` -- Indicates the start of a word\n- `$` -- Indicates the end of a word\n\
|
|
1989
|
-
"markdownDescription": "Defines a word break rule based on a string.\n\nFormat:\n- `\"before|after\"` -- Matches a word break between `before` and `after`\n- `\"before|after$\"` -- Matches a word break between `before` and `after` at the end of a word\n- `\"^before|after\"` -- Matches a word break between `before` at the start of a word and `after`\n- `\"^before|after$\"` -- Matches a word break between `before` at the start of a word and `after` at the end of a word\n- `\"before|\"` -- Matches a word break after `before`\n- `\"^before|\"` -- Matches a word break after `before` at the start of a word\n- `\"|after\"` -- Matches a word break before `after`\n- `\"|after$\"` -- Matches a word break before `after` at the end of a word\n\n\nWhere `before` is the text before the word break and `after` is the text after the word break.\n\nSpecial characters like `|`, `^`, and `$` have specific meanings.\n- `|` -- Represents the position of the word break\n- `^` -- Indicates the start of a word\n- `$` -- Indicates the end of a word\n\
|
|
1988
|
+
"description": "Defines a word break rule based on a string.\n\nFormat:\n- `\"before|after\"` -- Matches a word break between `before` and `after`\n- `\"before|after$\"` -- Matches a word break between `before` and `after` at the end of a word\n- `\"^before|after\"` -- Matches a word break between `before` at the start of a word and `after`\n- `\"^before|after$\"` -- Matches a word break between `before` at the start of a word and `after` at the end of a word\n- `\"before|\"` -- Matches a word break after `before`\n- `\"^before|\"` -- Matches a word break after `before` at the start of a word\n- `\"|after\"` -- Matches a word break before `after`\n- `\"|after$\"` -- Matches a word break before `after` at the end of a word\n\n\nWhere `before` is the text before the word break and `after` is the text after the word break.\n\nSpecial characters like `|`, `^`, and `$` have specific meanings.\n- `|` -- Represents the position of the word break\n- `^` -- Indicates the start of a word\n- `$` -- Indicates the end of a word\n\nExamples:\n- `\"^ptr|\"` -- Would help with pointer definitions starting with `ptr`, such as `ptrvalue`.\n- `\"^I|\"` -- Would help with interface definitions starting with `I`, such as `IERROR`.",
|
|
1989
|
+
"markdownDescription": "Defines a word break rule based on a string.\n\nFormat:\n- `\"before|after\"` -- Matches a word break between `before` and `after`\n- `\"before|after$\"` -- Matches a word break between `before` and `after` at the end of a word\n- `\"^before|after\"` -- Matches a word break between `before` at the start of a word and `after`\n- `\"^before|after$\"` -- Matches a word break between `before` at the start of a word and `after` at the end of a word\n- `\"before|\"` -- Matches a word break after `before`\n- `\"^before|\"` -- Matches a word break after `before` at the start of a word\n- `\"|after\"` -- Matches a word break before `after`\n- `\"|after$\"` -- Matches a word break before `after` at the end of a word\n\n\nWhere `before` is the text before the word break and `after` is the text after the word break.\n\nSpecial characters like `|`, `^`, and `$` have specific meanings.\n- `|` -- Represents the position of the word break\n- `^` -- Indicates the start of a word\n- `$` -- Indicates the end of a word\n\nExamples:\n- `\"^ptr|\"` -- Would help with pointer definitions starting with `ptr`, such as `ptrvalue`.\n- `\"^I|\"` -- Would help with interface definitions starting with `I`, such as `IERROR`.",
|
|
1990
1990
|
"since": "10.3.1",
|
|
1991
1991
|
"type": "string"
|
|
1992
1992
|
},
|
package/dist/Parser/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as TextDocumentFragment, a as ParsedTag, c as Parser, d as Scope, f as ScopeChain, g as TextDocument, h as SourceMap, i as ParseResult, l as ParserName, m as Range, n as DelegateInfo, o as ParsedTags, p as ScopeString, r as DocumentParser, s as ParsedText, t as MappedText, u as ParserOptions } from "../index-
|
|
1
|
+
import { _ as TextDocumentFragment, a as ParsedTag, c as Parser, d as Scope, f as ScopeChain, g as TextDocument, h as SourceMap, i as ParseResult, l as ParserName, m as Range, n as DelegateInfo, o as ParsedTags, p as ScopeString, r as DocumentParser, s as ParsedText, t as MappedText, u as ParserOptions } from "../index-BVAK5kk5.mjs";
|
|
2
2
|
export type { DelegateInfo, DocumentParser, MappedText, ParseResult, ParsedTag, ParsedTags, ParsedText, Parser, ParserName, ParserOptions, Range, Scope, ScopeChain, ScopeString, SourceMap, TextDocument, TextDocumentFragment };
|
package/dist/Parser/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as TextDocumentFragment, a as ParsedTag, c as Parser, d as Scope, f as ScopeChain, g as TextDocument, h as SourceMap, i as ParseResult, l as ParserName, m as Range, n as DelegateInfo, o as ParsedTags, p as ScopeString, r as DocumentParser, s as ParsedText, t as MappedText, u as ParserOptions } from "../index-
|
|
1
|
+
import { _ as TextDocumentFragment, a as ParsedTag, c as Parser, d as Scope, f as ScopeChain, g as TextDocument, h as SourceMap, i as ParseResult, l as ParserName, m as Range, n as DelegateInfo, o as ParsedTags, p as ScopeString, r as DocumentParser, s as ParsedText, t as MappedText, u as ParserOptions } from "../index-BVAK5kk5.js";
|
|
2
2
|
export type { DelegateInfo, DocumentParser, MappedText, ParseResult, ParsedTag, ParsedTags, ParsedText, Parser, ParserName, ParserOptions, Range, Scope, ScopeChain, ScopeString, SourceMap, TextDocument, TextDocumentFragment };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/Parser/types.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* A SourceMap is used to map or transform the location of a piece of text back to its original offsets.
|
|
4
3
|
* This is necessary in order to report the correct location of a spelling issue.
|
|
@@ -51,7 +50,7 @@ type SourceMap = number[];
|
|
|
51
50
|
type Range = readonly [start: number, end: number];
|
|
52
51
|
/**
|
|
53
52
|
* Interface used to pass documents to the parser.
|
|
54
|
-
* @since
|
|
53
|
+
* @since 11.0.0
|
|
55
54
|
*/
|
|
56
55
|
interface TextDocument {
|
|
57
56
|
/**
|
|
@@ -67,7 +66,7 @@ interface TextDocument {
|
|
|
67
66
|
}
|
|
68
67
|
/**
|
|
69
68
|
* A fragment of a text document, representing a subset of the full document.
|
|
70
|
-
* @since
|
|
69
|
+
* @since 11.0.0
|
|
71
70
|
*/
|
|
72
71
|
interface TextDocumentFragment extends TextDocument {
|
|
73
72
|
/**
|
|
@@ -83,8 +82,6 @@ interface TextDocumentFragment extends TextDocument {
|
|
|
83
82
|
*/
|
|
84
83
|
readonly fullText?: string;
|
|
85
84
|
}
|
|
86
|
-
//#endregion
|
|
87
|
-
//#region src/Parser/Mapped.d.ts
|
|
88
85
|
interface Mapped {
|
|
89
86
|
/**
|
|
90
87
|
* The absolute start and end offset of the text in the source.
|
|
@@ -105,8 +102,6 @@ interface Mapped {
|
|
|
105
102
|
*/
|
|
106
103
|
map?: SourceMap | undefined;
|
|
107
104
|
}
|
|
108
|
-
//#endregion
|
|
109
|
-
//#region src/Parser/parser.d.ts
|
|
110
105
|
type ParserOptions = Record<string, unknown>;
|
|
111
106
|
type ParserName = string;
|
|
112
107
|
interface Parser {
|
|
@@ -237,8 +232,6 @@ type ParsedTag = boolean | undefined;
|
|
|
237
232
|
interface ParsedTags {
|
|
238
233
|
readonly [tag: string]: ParsedTag;
|
|
239
234
|
}
|
|
240
|
-
//#endregion
|
|
241
|
-
//#region src/Parser/TextMap.d.ts
|
|
242
235
|
type MappedText = Readonly<TransformedText>;
|
|
243
236
|
interface TransformedText extends Mapped {
|
|
244
237
|
/**
|
|
@@ -250,6 +243,5 @@ interface TransformedText extends Mapped {
|
|
|
250
243
|
*/
|
|
251
244
|
rawText?: string | undefined;
|
|
252
245
|
}
|
|
253
|
-
//#endregion
|
|
254
246
|
export { TextDocumentFragment as _, ParsedTag as a, Parser as c, Scope as d, ScopeChain as f, TextDocument as g, SourceMap as h, ParseResult as i, ParserName as l, Range as m, DelegateInfo as n, ParsedTags as o, ScopeString as p, DocumentParser as r, ParsedText as s, MappedText as t, ParserOptions as u };
|
|
255
|
-
//# sourceMappingURL=index-
|
|
247
|
+
//# sourceMappingURL=index-BVAK5kk5.d.mts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/Parser/types.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* A SourceMap is used to map or transform the location of a piece of text back to its original offsets.
|
|
4
3
|
* This is necessary in order to report the correct location of a spelling issue.
|
|
@@ -51,7 +50,7 @@ type SourceMap = number[];
|
|
|
51
50
|
type Range = readonly [start: number, end: number];
|
|
52
51
|
/**
|
|
53
52
|
* Interface used to pass documents to the parser.
|
|
54
|
-
* @since
|
|
53
|
+
* @since 11.0.0
|
|
55
54
|
*/
|
|
56
55
|
interface TextDocument {
|
|
57
56
|
/**
|
|
@@ -67,7 +66,7 @@ interface TextDocument {
|
|
|
67
66
|
}
|
|
68
67
|
/**
|
|
69
68
|
* A fragment of a text document, representing a subset of the full document.
|
|
70
|
-
* @since
|
|
69
|
+
* @since 11.0.0
|
|
71
70
|
*/
|
|
72
71
|
interface TextDocumentFragment extends TextDocument {
|
|
73
72
|
/**
|
|
@@ -83,8 +82,6 @@ interface TextDocumentFragment extends TextDocument {
|
|
|
83
82
|
*/
|
|
84
83
|
readonly fullText?: string;
|
|
85
84
|
}
|
|
86
|
-
//#endregion
|
|
87
|
-
//#region src/Parser/Mapped.d.ts
|
|
88
85
|
interface Mapped {
|
|
89
86
|
/**
|
|
90
87
|
* The absolute start and end offset of the text in the source.
|
|
@@ -105,8 +102,6 @@ interface Mapped {
|
|
|
105
102
|
*/
|
|
106
103
|
map?: SourceMap | undefined;
|
|
107
104
|
}
|
|
108
|
-
//#endregion
|
|
109
|
-
//#region src/Parser/parser.d.ts
|
|
110
105
|
type ParserOptions = Record<string, unknown>;
|
|
111
106
|
type ParserName = string;
|
|
112
107
|
interface Parser {
|
|
@@ -237,8 +232,6 @@ type ParsedTag = boolean | undefined;
|
|
|
237
232
|
interface ParsedTags {
|
|
238
233
|
readonly [tag: string]: ParsedTag;
|
|
239
234
|
}
|
|
240
|
-
//#endregion
|
|
241
|
-
//#region src/Parser/TextMap.d.ts
|
|
242
235
|
type MappedText = Readonly<TransformedText>;
|
|
243
236
|
interface TransformedText extends Mapped {
|
|
244
237
|
/**
|
|
@@ -250,6 +243,5 @@ interface TransformedText extends Mapped {
|
|
|
250
243
|
*/
|
|
251
244
|
rawText?: string | undefined;
|
|
252
245
|
}
|
|
253
|
-
//#endregion
|
|
254
246
|
export { TextDocumentFragment as _, ParsedTag as a, Parser as c, Scope as d, ScopeChain as f, TextDocument as g, SourceMap as h, ParseResult as i, ParserName as l, Range as m, DelegateInfo as n, ParsedTags as o, ScopeString as p, DocumentParser as r, ParsedText as s, MappedText as t, ParserOptions as u };
|
|
255
|
-
//# sourceMappingURL=index-
|
|
247
|
+
//# sourceMappingURL=index-BVAK5kk5.d.ts.map
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { _ as TextDocumentFragment, a as ParsedTag, c as Parser, g as TextDocument, h as SourceMap, i as ParseResult, l as ParserName, m as Range, o as ParsedTags, r as DocumentParser, s as ParsedText, t as MappedText, u as ParserOptions } from "./index-
|
|
2
|
-
//#region src/cspell-vfs.d.ts
|
|
1
|
+
import { _ as TextDocumentFragment, a as ParsedTag, c as Parser, g as TextDocument, h as SourceMap, i as ParseResult, l as ParserName, m as Range, o as ParsedTags, r as DocumentParser, s as ParsedText, t as MappedText, u as ParserOptions } from "./index-BVAK5kk5.mjs";
|
|
3
2
|
/**
|
|
4
3
|
* Binary data for CSpellVFS file.
|
|
5
4
|
* This can be exported by a JavaScript based CSpell Configuration file.
|
|
@@ -59,8 +58,6 @@ type CSpellVFSFileUrl = string;
|
|
|
59
58
|
* @stability experimental
|
|
60
59
|
*/
|
|
61
60
|
type CSpellVFS = Record<CSpellVFSFileUrl, CSpellVFSFileEntry>;
|
|
62
|
-
//#endregion
|
|
63
|
-
//#region src/SuggestionsConfiguration.d.ts
|
|
64
61
|
interface SuggestionsConfiguration {
|
|
65
62
|
/**
|
|
66
63
|
* Number of suggestions to make.
|
|
@@ -85,8 +82,6 @@ interface SuggestionsConfiguration {
|
|
|
85
82
|
*/
|
|
86
83
|
suggestionNumChanges?: number;
|
|
87
84
|
}
|
|
88
|
-
//#endregion
|
|
89
|
-
//#region src/TextOffset.d.ts
|
|
90
85
|
interface TextOffset {
|
|
91
86
|
/**
|
|
92
87
|
* The text found at the offset. If the text has been transformed, then the length might not match `length`.
|
|
@@ -109,8 +104,6 @@ interface TextDocumentOffset extends TextOffset {
|
|
|
109
104
|
col: number;
|
|
110
105
|
line: TextOffset;
|
|
111
106
|
}
|
|
112
|
-
//#endregion
|
|
113
|
-
//#region src/CSpellReporter.d.ts
|
|
114
107
|
interface Suggestion {
|
|
115
108
|
/**
|
|
116
109
|
* Word to suggest.
|
|
@@ -166,13 +159,13 @@ interface Issue extends Omit<TextDocumentOffset, "doc"> {
|
|
|
166
159
|
*/
|
|
167
160
|
hasPreferredSuggestions?: boolean | undefined;
|
|
168
161
|
}
|
|
169
|
-
declare enum IssueType {
|
|
162
|
+
export declare enum IssueType {
|
|
170
163
|
spelling = 0,
|
|
171
164
|
directive = 1
|
|
172
165
|
}
|
|
173
166
|
type MessageType = "Debug" | "Info" | "Warning";
|
|
174
167
|
type MessageTypeLookup = { [key in MessageType]: key; };
|
|
175
|
-
declare const MessageTypes: MessageTypeLookup;
|
|
168
|
+
export declare const MessageTypes: MessageTypeLookup;
|
|
176
169
|
type MessageEmitter = (message: string, msgType: MessageType) => void;
|
|
177
170
|
type DebugEmitter = (message: string) => void;
|
|
178
171
|
type ErrorLike = Error | {
|
|
@@ -375,7 +368,7 @@ interface ReportIssueOptions extends UnknownWordsConfiguration {
|
|
|
375
368
|
* Possible choices for how to handle unknown words.
|
|
376
369
|
*/
|
|
377
370
|
type UnknownWordsChoices = "report-all" | "report-simple" | "report-common-typos" | "report-flagged";
|
|
378
|
-
declare const unknownWordsChoices: {
|
|
371
|
+
export declare const unknownWordsChoices: {
|
|
379
372
|
readonly ReportAll: "report-all";
|
|
380
373
|
readonly ReportSimple: "report-simple";
|
|
381
374
|
readonly ReportCommonTypos: "report-common-typos";
|
|
@@ -395,8 +388,6 @@ interface UnknownWordsConfiguration {
|
|
|
395
388
|
*/
|
|
396
389
|
unknownWords?: UnknownWordsChoices | undefined;
|
|
397
390
|
}
|
|
398
|
-
//#endregion
|
|
399
|
-
//#region src/CSpellValidation.d.ts
|
|
400
391
|
interface CSpellSettingsValidation {
|
|
401
392
|
/**
|
|
402
393
|
* Control which segments of text emitted by a parser are spell checked, based upon
|
|
@@ -428,7 +419,7 @@ interface CSpellSettingsValidation {
|
|
|
428
419
|
*
|
|
429
420
|
* @default { "*": true }
|
|
430
421
|
* @experimental
|
|
431
|
-
* @since
|
|
422
|
+
* @since 11.0.0
|
|
432
423
|
*/
|
|
433
424
|
validate?: ValidationTags;
|
|
434
425
|
}
|
|
@@ -455,8 +446,6 @@ interface ValidationTags {
|
|
|
455
446
|
*/
|
|
456
447
|
[tag: TagPattern]: boolean | undefined;
|
|
457
448
|
}
|
|
458
|
-
//#endregion
|
|
459
|
-
//#region src/suggestionCostsDef.d.ts
|
|
460
449
|
/**
|
|
461
450
|
* A WeightedMapDef enables setting weights for edits between related characters and substrings.
|
|
462
451
|
*
|
|
@@ -543,18 +532,24 @@ interface CostMapDefInsDel extends CostMapDefBase {
|
|
|
543
532
|
interface CostMapDefSwap extends CostMapDefBase {
|
|
544
533
|
swap: number;
|
|
545
534
|
}
|
|
546
|
-
//#endregion
|
|
547
|
-
//#region src/DictionaryInformation.d.ts
|
|
548
535
|
/**
|
|
549
|
-
*
|
|
550
|
-
*
|
|
536
|
+
* Provides extra information about the dictionary.
|
|
537
|
+
*
|
|
538
|
+
* It is used to improve suggestions and casing rules.
|
|
551
539
|
*
|
|
552
540
|
* Added with `v5.16.0`.
|
|
553
541
|
*/
|
|
554
542
|
interface DictionaryInformation {
|
|
555
543
|
/**
|
|
556
544
|
* The locale of the dictionary.
|
|
557
|
-
*
|
|
545
|
+
*
|
|
546
|
+
* The locale should follow the IETF BCP 47 standard.
|
|
547
|
+
* If more than one locale is specified, the first valid locale will be used for casing rules.
|
|
548
|
+
*
|
|
549
|
+
* Avoid mixing different locales in the same dictionary.
|
|
550
|
+
*
|
|
551
|
+
* Example: `nl` or `nl-BE`
|
|
552
|
+
*
|
|
558
553
|
*/
|
|
559
554
|
locale?: string;
|
|
560
555
|
/**
|
|
@@ -756,8 +751,6 @@ interface PatternAdjustment {
|
|
|
756
751
|
/** The amount of penalty to apply. */
|
|
757
752
|
penalty: number;
|
|
758
753
|
}
|
|
759
|
-
//#endregion
|
|
760
|
-
//#region src/InlineDictionary.d.ts
|
|
761
754
|
interface InlineDictionary {
|
|
762
755
|
/**
|
|
763
756
|
* List of words to be considered correct.
|
|
@@ -810,8 +803,6 @@ interface InlineDictionary {
|
|
|
810
803
|
*/
|
|
811
804
|
suggestWords?: string[];
|
|
812
805
|
}
|
|
813
|
-
//#endregion
|
|
814
|
-
//#region src/DictionaryDefinition.d.ts
|
|
815
806
|
type DictionaryDefinition = DictionaryDefinitionPreferred | DictionaryDefinitionCustom | DictionaryDefinitionAugmented | DictionaryDefinitionInline | DictionaryDefinitionSimple | DictionaryDefinitionAlternate | DictionaryDefinitionLegacy;
|
|
816
807
|
type DictionaryFileTypes = "S" | "W" | "C" | "T";
|
|
817
808
|
interface DictionaryDefinitionBase {
|
|
@@ -1183,8 +1174,6 @@ type DictionaryKindSuggestWords = "suggest-words";
|
|
|
1183
1174
|
* - `suggest-words` - A dictionary containing suggested word corrections.
|
|
1184
1175
|
*/
|
|
1185
1176
|
type DictionaryKind = DictionaryKindWords | DictionaryKindFlagWords | DictionaryKindIgnoreWords | DictionaryKindSuggestWords;
|
|
1186
|
-
//#endregion
|
|
1187
|
-
//#region src/features.d.ts
|
|
1188
1177
|
/**
|
|
1189
1178
|
* These are experimental features and are subject to change or removal without notice.
|
|
1190
1179
|
*/
|
|
@@ -1225,11 +1214,9 @@ type FeatureEnableOnly = boolean;
|
|
|
1225
1214
|
interface FeatureWithConfiguration {
|
|
1226
1215
|
enable: boolean;
|
|
1227
1216
|
}
|
|
1228
|
-
//#endregion
|
|
1229
|
-
//#region src/Plugin/index.d.ts
|
|
1230
1217
|
type CreateParser<Options = unknown> = (name: string, options?: Options) => Promise<DocumentParser | undefined> | DocumentParser | undefined;
|
|
1231
1218
|
/**
|
|
1232
|
-
* @since
|
|
1219
|
+
* @since 11.0.0
|
|
1233
1220
|
*/
|
|
1234
1221
|
interface AvailableParsers<Options> {
|
|
1235
1222
|
/**
|
|
@@ -1239,7 +1226,7 @@ interface AvailableParsers<Options> {
|
|
|
1239
1226
|
[name: string]: DocumentParser | Parser | CreateParser<Options>;
|
|
1240
1227
|
}
|
|
1241
1228
|
/**
|
|
1242
|
-
* @since
|
|
1229
|
+
* @since 11.0.0
|
|
1243
1230
|
*/
|
|
1244
1231
|
type Parsers = (DocumentParser | Parser)[];
|
|
1245
1232
|
/**
|
|
@@ -1267,8 +1254,6 @@ interface CSpellSettingsPlugins {
|
|
|
1267
1254
|
*/
|
|
1268
1255
|
plugins?: CSpellPlugin[];
|
|
1269
1256
|
}
|
|
1270
|
-
//#endregion
|
|
1271
|
-
//#region src/Substitutions.d.ts
|
|
1272
1257
|
/**
|
|
1273
1258
|
* The ID for a substitution definition. This is used to reference the substitution definition in the substitutions array.
|
|
1274
1259
|
* @since 9.7.0
|
|
@@ -1324,11 +1309,7 @@ type SubstitutionDefinitions = SubstitutionDefinition[];
|
|
|
1324
1309
|
* This is a collection of substitution entries that can be applied to a document before spell checking.
|
|
1325
1310
|
*/
|
|
1326
1311
|
type Substitutions = (SubstitutionEntry | SubstitutionID)[];
|
|
1327
|
-
//#endregion
|
|
1328
|
-
//#region src/types.d.ts
|
|
1329
1312
|
type Serializable = number | string | boolean | null | object;
|
|
1330
|
-
//#endregion
|
|
1331
|
-
//#region src/WordSegmentation.d.ts
|
|
1332
1313
|
interface WordSegmentationSettings {
|
|
1333
1314
|
/**
|
|
1334
1315
|
* Enables locale-sensitive text segmentation to support languages like Japanese, Chinese, Thai, Lao, Khmer, Myanmar, etc.
|
|
@@ -1411,8 +1392,6 @@ type SoftWordBreakRegExpString = string;
|
|
|
1411
1392
|
* - `^` -- Indicates the start of a word
|
|
1412
1393
|
* - `$` -- Indicates the end of a word
|
|
1413
1394
|
*
|
|
1414
|
-
* For more complicated word break rules, consider using regular expressions with the {@link SoftWordBreakRegExp} type.
|
|
1415
|
-
*
|
|
1416
1395
|
* Examples:
|
|
1417
1396
|
* - `"^ptr|"` -- Would help with pointer definitions starting with `ptr`, such as `ptrvalue`.
|
|
1418
1397
|
* - `"^I|"` -- Would help with interface definitions starting with `I`, such as `IERROR`.
|
|
@@ -1449,8 +1428,6 @@ interface SoftWordBreakDefinitions {
|
|
|
1449
1428
|
interface SoftWordBreaks {
|
|
1450
1429
|
[name: string]: boolean;
|
|
1451
1430
|
}
|
|
1452
|
-
//#endregion
|
|
1453
|
-
//#region src/CSpellSettingsDef.d.ts
|
|
1454
1431
|
/**
|
|
1455
1432
|
* These settings come from user and workspace settings.
|
|
1456
1433
|
*/
|
|
@@ -2240,25 +2217,16 @@ interface CompatibleEngineVersions {
|
|
|
2240
2217
|
*/
|
|
2241
2218
|
[engine: string]: SemVersionPredicate | undefined;
|
|
2242
2219
|
}
|
|
2243
|
-
//#endregion
|
|
2244
|
-
//#region src/configFields.d.ts
|
|
2245
2220
|
type ConfigKeys = Exclude<keyof CSpellUserSettings, "$schema" | "version" | "id">;
|
|
2246
2221
|
type CSpellUserSettingsFields = { [key in ConfigKeys]: key; };
|
|
2247
|
-
declare const ConfigFields: CSpellUserSettingsFields;
|
|
2248
|
-
|
|
2249
|
-
//#region src/defaultConfigSettings.d.ts
|
|
2250
|
-
declare const defaultCSpellSettings: {
|
|
2222
|
+
export declare const ConfigFields: CSpellUserSettingsFields;
|
|
2223
|
+
export declare const defaultCSpellSettings: {
|
|
2251
2224
|
readonly ignoreRandomStrings: boolean;
|
|
2252
2225
|
readonly minRandomLength: number;
|
|
2253
2226
|
};
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
declare function
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
declare function mergeConfig(settings: CSpellSettings[]): CSpellSettings;
|
|
2260
|
-
declare function mergeConfig(...settings: [CSpellSettings, ...CSpellSettings[]]): CSpellSettings;
|
|
2261
|
-
declare function mergeConfig(...settings: [CSpellSettings[], ...CSpellSettings[]]): CSpellSettings;
|
|
2262
|
-
//#endregion
|
|
2263
|
-
export { type AdvancedCSpellSettings, type AdvancedCSpellSettingsWithSourceTrace, type AvailableParsers, type BaseSetting, type CSpellPackageSettings, type CSpellPlugin, type CSpellPlugin as Plugin, type CSpellReporter, type CSpellReporterEmitters, type CSpellReporterModule, type CSpellSettings, type CSpellSettingsWithSourceTrace, type CSpellUserSettings, type CSpellUserSettingsFields, type CSpellUserSettingsWithComments, type CSpellVFS, type CSpellVFSBinaryData, type CSpellVFSData, type CSpellVFSFile, type CSpellVFSFileEntry, type CSpellVFSFileUrl, type CSpellVFSTextData, type CacheFormat, type CacheSettings, type CacheStrategy, type CharacterSet, type CharacterSetCosts, type CommandLineSettings, ConfigFields, type CreateParser, type CustomDictionaryPath, type CustomDictionaryScope, type DebugEmitter, type DictionaryDefinition, type DictionaryDefinitionAlternate, type DictionaryDefinitionAugmented, type DictionaryDefinitionBase, type DictionaryDefinitionCustom, type DictionaryDefinitionInline, type DictionaryDefinitionInlineFlagWords, type DictionaryDefinitionInlineIgnoreWords, type DictionaryDefinitionInlineWords, type DictionaryDefinitionLegacy, type DictionaryDefinitionPreferred, type DictionaryDefinitionSimple, type DictionaryFileTypes, type DictionaryId, type DictionaryInformation, type DictionaryNegRef, type DictionaryPath, type DictionaryRef, type DictionaryReference, type DocumentParser, type EditCosts, type ErrorEmitter, type ErrorLike, type ExperimentalBaseSettings, type ExperimentalFileSettings, type ExtendableSettings, type FSPathResolvable, type Feature, type Features, type FeaturesSupportedByReporter, type FileSettings, type FileSource, type FsPath, type Glob, type GlobDef, type ImportFileRef, type InMemorySource, type Issue, IssueType, type LanguageId, type LanguageIdMultiple, type LanguageIdMultipleNeg, type LanguageIdSingle, type LanguageSetting, type LanguageSettingFilterFields, type LanguageSettingFilterFieldsDeprecated, type LanguageSettingFilterFieldsPreferred, type LegacySettings, type LocalId, type LocaleId, type MappedText, type MatchingFileType, type MergeSource, type MessageEmitter, type MessageType, type MessageTypeLookup, MessageTypes, type OverrideFilterFields, type OverrideSettings, type ParseResult, type ParsedTag, type ParsedTags, type ParsedText, type Parser, type ParserName, type ParserOptions, type Parsers, type Pattern, type PatternId, type PatternRef, type PnPSettings, type PredefinedPatterns, type ProgressBase, type ProgressEmitter, type ProgressFileBase, type ProgressFileBegin, type ProgressFileComplete, type ProgressItem, type ProgressTypes, type Range, type RegExpPatternDefinition, type RegExpPatternList, type ReplaceEntry, type ReplaceMap, type ReportIssueOptions, type ReporterConfiguration, type ReporterSettings, type ReportingConfiguration, type ResultEmitter, type RunResult, type Settings, type SimpleGlob, type SoftWordBreak, type SoftWordBreakDefinitions, type SoftWordBreakPattern, type SoftWordBreakRegExp, type SoftWordBreakRegExpString, type SoftWordBreakRule, type SoftWordBreaks, type Source, type SourceMap, type SpellingErrorEmitter, type SubstitutionDefinition, type SubstitutionDefinitions, type SubstitutionEntry, type SubstitutionID, type Substitutions, type SuggestionCostMapDef, type SuggestionCostsDefs, type SuggestionsConfiguration, type TagPattern, type TextDocument, type TextDocumentFragment, type TextDocumentOffset, type TextOffset, type TrustLevel, type UnknownWordsChoices, type UnknownWordsConfiguration, type ValidationTags, type Version, type VersionLatest, type VersionLegacy, type WordSegmentationSettings, type WorkspaceTrustSettings, defaultCSpellSettings, defineConfig, mergeConfig, unknownWordsChoices };
|
|
2227
|
+
export declare function defineConfig(config: AdvancedCSpellSettings): CSpellSettings;
|
|
2228
|
+
export declare function mergeConfig(settings: CSpellSettings[]): CSpellSettings;
|
|
2229
|
+
export declare function mergeConfig(...settings: [CSpellSettings, ...CSpellSettings[]]): CSpellSettings;
|
|
2230
|
+
export declare function mergeConfig(...settings: [CSpellSettings[], ...CSpellSettings[]]): CSpellSettings;
|
|
2231
|
+
export type { AdvancedCSpellSettings, AdvancedCSpellSettingsWithSourceTrace, AvailableParsers, BaseSetting, CSpellPackageSettings, CSpellPlugin, CSpellPlugin as Plugin, CSpellReporter, CSpellReporterEmitters, CSpellReporterModule, CSpellSettings, CSpellSettingsWithSourceTrace, CSpellUserSettings, CSpellUserSettingsFields, CSpellUserSettingsWithComments, CSpellVFS, CSpellVFSBinaryData, CSpellVFSData, CSpellVFSFile, CSpellVFSFileEntry, CSpellVFSFileUrl, CSpellVFSTextData, CacheFormat, CacheSettings, CacheStrategy, CharacterSet, CharacterSetCosts, CommandLineSettings, CreateParser, CustomDictionaryPath, CustomDictionaryScope, DebugEmitter, DictionaryDefinition, DictionaryDefinitionAlternate, DictionaryDefinitionAugmented, DictionaryDefinitionBase, DictionaryDefinitionCustom, DictionaryDefinitionInline, DictionaryDefinitionInlineFlagWords, DictionaryDefinitionInlineIgnoreWords, DictionaryDefinitionInlineWords, DictionaryDefinitionLegacy, DictionaryDefinitionPreferred, DictionaryDefinitionSimple, DictionaryFileTypes, DictionaryId, DictionaryInformation, DictionaryNegRef, DictionaryPath, DictionaryRef, DictionaryReference, DocumentParser, EditCosts, ErrorEmitter, ErrorLike, ExperimentalBaseSettings, ExperimentalFileSettings, ExtendableSettings, FSPathResolvable, Feature, Features, FeaturesSupportedByReporter, FileSettings, FileSource, FsPath, Glob, GlobDef, ImportFileRef, InMemorySource, Issue, LanguageId, LanguageIdMultiple, LanguageIdMultipleNeg, LanguageIdSingle, LanguageSetting, LanguageSettingFilterFields, LanguageSettingFilterFieldsDeprecated, LanguageSettingFilterFieldsPreferred, LegacySettings, LocalId, LocaleId, MappedText, MatchingFileType, MergeSource, MessageEmitter, MessageType, MessageTypeLookup, OverrideFilterFields, OverrideSettings, ParseResult, ParsedTag, ParsedTags, ParsedText, Parser, ParserName, ParserOptions, Parsers, Pattern, PatternId, PatternRef, PnPSettings, PredefinedPatterns, ProgressBase, ProgressEmitter, ProgressFileBase, ProgressFileBegin, ProgressFileComplete, ProgressItem, ProgressTypes, Range, RegExpPatternDefinition, RegExpPatternList, ReplaceEntry, ReplaceMap, ReportIssueOptions, ReporterConfiguration, ReporterSettings, ReportingConfiguration, ResultEmitter, RunResult, Settings, SimpleGlob, SoftWordBreak, SoftWordBreakDefinitions, SoftWordBreakPattern, SoftWordBreakRegExp, SoftWordBreakRegExpString, SoftWordBreakRule, SoftWordBreaks, Source, SourceMap, SpellingErrorEmitter, SubstitutionDefinition, SubstitutionDefinitions, SubstitutionEntry, SubstitutionID, Substitutions, SuggestionCostMapDef, SuggestionCostsDefs, SuggestionsConfiguration, TagPattern, TextDocument, TextDocumentFragment, TextDocumentOffset, TextOffset, TrustLevel, UnknownWordsChoices, UnknownWordsConfiguration, ValidationTags, Version, VersionLatest, VersionLegacy, WordSegmentationSettings, WorkspaceTrustSettings };
|
|
2264
2232
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { _ as TextDocumentFragment, a as ParsedTag, c as Parser, g as TextDocument, h as SourceMap, i as ParseResult, l as ParserName, m as Range, o as ParsedTags, r as DocumentParser, s as ParsedText, t as MappedText, u as ParserOptions } from "./index-
|
|
2
|
-
//#region src/cspell-vfs.d.ts
|
|
1
|
+
import { _ as TextDocumentFragment, a as ParsedTag, c as Parser, g as TextDocument, h as SourceMap, i as ParseResult, l as ParserName, m as Range, o as ParsedTags, r as DocumentParser, s as ParsedText, t as MappedText, u as ParserOptions } from "./index-BVAK5kk5.js";
|
|
3
2
|
/**
|
|
4
3
|
* Binary data for CSpellVFS file.
|
|
5
4
|
* This can be exported by a JavaScript based CSpell Configuration file.
|
|
@@ -59,8 +58,6 @@ type CSpellVFSFileUrl = string;
|
|
|
59
58
|
* @stability experimental
|
|
60
59
|
*/
|
|
61
60
|
type CSpellVFS = Record<CSpellVFSFileUrl, CSpellVFSFileEntry>;
|
|
62
|
-
//#endregion
|
|
63
|
-
//#region src/SuggestionsConfiguration.d.ts
|
|
64
61
|
interface SuggestionsConfiguration {
|
|
65
62
|
/**
|
|
66
63
|
* Number of suggestions to make.
|
|
@@ -85,8 +82,6 @@ interface SuggestionsConfiguration {
|
|
|
85
82
|
*/
|
|
86
83
|
suggestionNumChanges?: number;
|
|
87
84
|
}
|
|
88
|
-
//#endregion
|
|
89
|
-
//#region src/TextOffset.d.ts
|
|
90
85
|
interface TextOffset {
|
|
91
86
|
/**
|
|
92
87
|
* The text found at the offset. If the text has been transformed, then the length might not match `length`.
|
|
@@ -109,8 +104,6 @@ interface TextDocumentOffset extends TextOffset {
|
|
|
109
104
|
col: number;
|
|
110
105
|
line: TextOffset;
|
|
111
106
|
}
|
|
112
|
-
//#endregion
|
|
113
|
-
//#region src/CSpellReporter.d.ts
|
|
114
107
|
interface Suggestion {
|
|
115
108
|
/**
|
|
116
109
|
* Word to suggest.
|
|
@@ -166,13 +159,13 @@ interface Issue extends Omit<TextDocumentOffset, "doc"> {
|
|
|
166
159
|
*/
|
|
167
160
|
hasPreferredSuggestions?: boolean | undefined;
|
|
168
161
|
}
|
|
169
|
-
declare enum IssueType {
|
|
162
|
+
export declare enum IssueType {
|
|
170
163
|
spelling = 0,
|
|
171
164
|
directive = 1
|
|
172
165
|
}
|
|
173
166
|
type MessageType = "Debug" | "Info" | "Warning";
|
|
174
167
|
type MessageTypeLookup = { [key in MessageType]: key; };
|
|
175
|
-
declare const MessageTypes: MessageTypeLookup;
|
|
168
|
+
export declare const MessageTypes: MessageTypeLookup;
|
|
176
169
|
type MessageEmitter = (message: string, msgType: MessageType) => void;
|
|
177
170
|
type DebugEmitter = (message: string) => void;
|
|
178
171
|
type ErrorLike = Error | {
|
|
@@ -375,7 +368,7 @@ interface ReportIssueOptions extends UnknownWordsConfiguration {
|
|
|
375
368
|
* Possible choices for how to handle unknown words.
|
|
376
369
|
*/
|
|
377
370
|
type UnknownWordsChoices = "report-all" | "report-simple" | "report-common-typos" | "report-flagged";
|
|
378
|
-
declare const unknownWordsChoices: {
|
|
371
|
+
export declare const unknownWordsChoices: {
|
|
379
372
|
readonly ReportAll: "report-all";
|
|
380
373
|
readonly ReportSimple: "report-simple";
|
|
381
374
|
readonly ReportCommonTypos: "report-common-typos";
|
|
@@ -395,8 +388,6 @@ interface UnknownWordsConfiguration {
|
|
|
395
388
|
*/
|
|
396
389
|
unknownWords?: UnknownWordsChoices | undefined;
|
|
397
390
|
}
|
|
398
|
-
//#endregion
|
|
399
|
-
//#region src/CSpellValidation.d.ts
|
|
400
391
|
interface CSpellSettingsValidation {
|
|
401
392
|
/**
|
|
402
393
|
* Control which segments of text emitted by a parser are spell checked, based upon
|
|
@@ -428,7 +419,7 @@ interface CSpellSettingsValidation {
|
|
|
428
419
|
*
|
|
429
420
|
* @default { "*": true }
|
|
430
421
|
* @experimental
|
|
431
|
-
* @since
|
|
422
|
+
* @since 11.0.0
|
|
432
423
|
*/
|
|
433
424
|
validate?: ValidationTags;
|
|
434
425
|
}
|
|
@@ -455,8 +446,6 @@ interface ValidationTags {
|
|
|
455
446
|
*/
|
|
456
447
|
[tag: TagPattern]: boolean | undefined;
|
|
457
448
|
}
|
|
458
|
-
//#endregion
|
|
459
|
-
//#region src/suggestionCostsDef.d.ts
|
|
460
449
|
/**
|
|
461
450
|
* A WeightedMapDef enables setting weights for edits between related characters and substrings.
|
|
462
451
|
*
|
|
@@ -543,18 +532,24 @@ interface CostMapDefInsDel extends CostMapDefBase {
|
|
|
543
532
|
interface CostMapDefSwap extends CostMapDefBase {
|
|
544
533
|
swap: number;
|
|
545
534
|
}
|
|
546
|
-
//#endregion
|
|
547
|
-
//#region src/DictionaryInformation.d.ts
|
|
548
535
|
/**
|
|
549
|
-
*
|
|
550
|
-
*
|
|
536
|
+
* Provides extra information about the dictionary.
|
|
537
|
+
*
|
|
538
|
+
* It is used to improve suggestions and casing rules.
|
|
551
539
|
*
|
|
552
540
|
* Added with `v5.16.0`.
|
|
553
541
|
*/
|
|
554
542
|
interface DictionaryInformation {
|
|
555
543
|
/**
|
|
556
544
|
* The locale of the dictionary.
|
|
557
|
-
*
|
|
545
|
+
*
|
|
546
|
+
* The locale should follow the IETF BCP 47 standard.
|
|
547
|
+
* If more than one locale is specified, the first valid locale will be used for casing rules.
|
|
548
|
+
*
|
|
549
|
+
* Avoid mixing different locales in the same dictionary.
|
|
550
|
+
*
|
|
551
|
+
* Example: `nl` or `nl-BE`
|
|
552
|
+
*
|
|
558
553
|
*/
|
|
559
554
|
locale?: string;
|
|
560
555
|
/**
|
|
@@ -756,8 +751,6 @@ interface PatternAdjustment {
|
|
|
756
751
|
/** The amount of penalty to apply. */
|
|
757
752
|
penalty: number;
|
|
758
753
|
}
|
|
759
|
-
//#endregion
|
|
760
|
-
//#region src/InlineDictionary.d.ts
|
|
761
754
|
interface InlineDictionary {
|
|
762
755
|
/**
|
|
763
756
|
* List of words to be considered correct.
|
|
@@ -810,8 +803,6 @@ interface InlineDictionary {
|
|
|
810
803
|
*/
|
|
811
804
|
suggestWords?: string[];
|
|
812
805
|
}
|
|
813
|
-
//#endregion
|
|
814
|
-
//#region src/DictionaryDefinition.d.ts
|
|
815
806
|
type DictionaryDefinition = DictionaryDefinitionPreferred | DictionaryDefinitionCustom | DictionaryDefinitionAugmented | DictionaryDefinitionInline | DictionaryDefinitionSimple | DictionaryDefinitionAlternate | DictionaryDefinitionLegacy;
|
|
816
807
|
type DictionaryFileTypes = "S" | "W" | "C" | "T";
|
|
817
808
|
interface DictionaryDefinitionBase {
|
|
@@ -1183,8 +1174,6 @@ type DictionaryKindSuggestWords = "suggest-words";
|
|
|
1183
1174
|
* - `suggest-words` - A dictionary containing suggested word corrections.
|
|
1184
1175
|
*/
|
|
1185
1176
|
type DictionaryKind = DictionaryKindWords | DictionaryKindFlagWords | DictionaryKindIgnoreWords | DictionaryKindSuggestWords;
|
|
1186
|
-
//#endregion
|
|
1187
|
-
//#region src/features.d.ts
|
|
1188
1177
|
/**
|
|
1189
1178
|
* These are experimental features and are subject to change or removal without notice.
|
|
1190
1179
|
*/
|
|
@@ -1225,11 +1214,9 @@ type FeatureEnableOnly = boolean;
|
|
|
1225
1214
|
interface FeatureWithConfiguration {
|
|
1226
1215
|
enable: boolean;
|
|
1227
1216
|
}
|
|
1228
|
-
//#endregion
|
|
1229
|
-
//#region src/Plugin/index.d.ts
|
|
1230
1217
|
type CreateParser<Options = unknown> = (name: string, options?: Options) => Promise<DocumentParser | undefined> | DocumentParser | undefined;
|
|
1231
1218
|
/**
|
|
1232
|
-
* @since
|
|
1219
|
+
* @since 11.0.0
|
|
1233
1220
|
*/
|
|
1234
1221
|
interface AvailableParsers<Options> {
|
|
1235
1222
|
/**
|
|
@@ -1239,7 +1226,7 @@ interface AvailableParsers<Options> {
|
|
|
1239
1226
|
[name: string]: DocumentParser | Parser | CreateParser<Options>;
|
|
1240
1227
|
}
|
|
1241
1228
|
/**
|
|
1242
|
-
* @since
|
|
1229
|
+
* @since 11.0.0
|
|
1243
1230
|
*/
|
|
1244
1231
|
type Parsers = (DocumentParser | Parser)[];
|
|
1245
1232
|
/**
|
|
@@ -1267,8 +1254,6 @@ interface CSpellSettingsPlugins {
|
|
|
1267
1254
|
*/
|
|
1268
1255
|
plugins?: CSpellPlugin[];
|
|
1269
1256
|
}
|
|
1270
|
-
//#endregion
|
|
1271
|
-
//#region src/Substitutions.d.ts
|
|
1272
1257
|
/**
|
|
1273
1258
|
* The ID for a substitution definition. This is used to reference the substitution definition in the substitutions array.
|
|
1274
1259
|
* @since 9.7.0
|
|
@@ -1324,11 +1309,7 @@ type SubstitutionDefinitions = SubstitutionDefinition[];
|
|
|
1324
1309
|
* This is a collection of substitution entries that can be applied to a document before spell checking.
|
|
1325
1310
|
*/
|
|
1326
1311
|
type Substitutions = (SubstitutionEntry | SubstitutionID)[];
|
|
1327
|
-
//#endregion
|
|
1328
|
-
//#region src/types.d.ts
|
|
1329
1312
|
type Serializable = number | string | boolean | null | object;
|
|
1330
|
-
//#endregion
|
|
1331
|
-
//#region src/WordSegmentation.d.ts
|
|
1332
1313
|
interface WordSegmentationSettings {
|
|
1333
1314
|
/**
|
|
1334
1315
|
* Enables locale-sensitive text segmentation to support languages like Japanese, Chinese, Thai, Lao, Khmer, Myanmar, etc.
|
|
@@ -1411,8 +1392,6 @@ type SoftWordBreakRegExpString = string;
|
|
|
1411
1392
|
* - `^` -- Indicates the start of a word
|
|
1412
1393
|
* - `$` -- Indicates the end of a word
|
|
1413
1394
|
*
|
|
1414
|
-
* For more complicated word break rules, consider using regular expressions with the {@link SoftWordBreakRegExp} type.
|
|
1415
|
-
*
|
|
1416
1395
|
* Examples:
|
|
1417
1396
|
* - `"^ptr|"` -- Would help with pointer definitions starting with `ptr`, such as `ptrvalue`.
|
|
1418
1397
|
* - `"^I|"` -- Would help with interface definitions starting with `I`, such as `IERROR`.
|
|
@@ -1449,8 +1428,6 @@ interface SoftWordBreakDefinitions {
|
|
|
1449
1428
|
interface SoftWordBreaks {
|
|
1450
1429
|
[name: string]: boolean;
|
|
1451
1430
|
}
|
|
1452
|
-
//#endregion
|
|
1453
|
-
//#region src/CSpellSettingsDef.d.ts
|
|
1454
1431
|
/**
|
|
1455
1432
|
* These settings come from user and workspace settings.
|
|
1456
1433
|
*/
|
|
@@ -2240,25 +2217,16 @@ interface CompatibleEngineVersions {
|
|
|
2240
2217
|
*/
|
|
2241
2218
|
[engine: string]: SemVersionPredicate | undefined;
|
|
2242
2219
|
}
|
|
2243
|
-
//#endregion
|
|
2244
|
-
//#region src/configFields.d.ts
|
|
2245
2220
|
type ConfigKeys = Exclude<keyof CSpellUserSettings, "$schema" | "version" | "id">;
|
|
2246
2221
|
type CSpellUserSettingsFields = { [key in ConfigKeys]: key; };
|
|
2247
|
-
declare const ConfigFields: CSpellUserSettingsFields;
|
|
2248
|
-
|
|
2249
|
-
//#region src/defaultConfigSettings.d.ts
|
|
2250
|
-
declare const defaultCSpellSettings: {
|
|
2222
|
+
export declare const ConfigFields: CSpellUserSettingsFields;
|
|
2223
|
+
export declare const defaultCSpellSettings: {
|
|
2251
2224
|
readonly ignoreRandomStrings: boolean;
|
|
2252
2225
|
readonly minRandomLength: number;
|
|
2253
2226
|
};
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
declare function
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
declare function mergeConfig(settings: CSpellSettings[]): CSpellSettings;
|
|
2260
|
-
declare function mergeConfig(...settings: [CSpellSettings, ...CSpellSettings[]]): CSpellSettings;
|
|
2261
|
-
declare function mergeConfig(...settings: [CSpellSettings[], ...CSpellSettings[]]): CSpellSettings;
|
|
2262
|
-
//#endregion
|
|
2263
|
-
export { type AdvancedCSpellSettings, type AdvancedCSpellSettingsWithSourceTrace, type AvailableParsers, type BaseSetting, type CSpellPackageSettings, type CSpellPlugin, type CSpellPlugin as Plugin, type CSpellReporter, type CSpellReporterEmitters, type CSpellReporterModule, type CSpellSettings, type CSpellSettingsWithSourceTrace, type CSpellUserSettings, type CSpellUserSettingsFields, type CSpellUserSettingsWithComments, type CSpellVFS, type CSpellVFSBinaryData, type CSpellVFSData, type CSpellVFSFile, type CSpellVFSFileEntry, type CSpellVFSFileUrl, type CSpellVFSTextData, type CacheFormat, type CacheSettings, type CacheStrategy, type CharacterSet, type CharacterSetCosts, type CommandLineSettings, ConfigFields, type CreateParser, type CustomDictionaryPath, type CustomDictionaryScope, type DebugEmitter, type DictionaryDefinition, type DictionaryDefinitionAlternate, type DictionaryDefinitionAugmented, type DictionaryDefinitionBase, type DictionaryDefinitionCustom, type DictionaryDefinitionInline, type DictionaryDefinitionInlineFlagWords, type DictionaryDefinitionInlineIgnoreWords, type DictionaryDefinitionInlineWords, type DictionaryDefinitionLegacy, type DictionaryDefinitionPreferred, type DictionaryDefinitionSimple, type DictionaryFileTypes, type DictionaryId, type DictionaryInformation, type DictionaryNegRef, type DictionaryPath, type DictionaryRef, type DictionaryReference, type DocumentParser, type EditCosts, type ErrorEmitter, type ErrorLike, type ExperimentalBaseSettings, type ExperimentalFileSettings, type ExtendableSettings, type FSPathResolvable, type Feature, type Features, type FeaturesSupportedByReporter, type FileSettings, type FileSource, type FsPath, type Glob, type GlobDef, type ImportFileRef, type InMemorySource, type Issue, IssueType, type LanguageId, type LanguageIdMultiple, type LanguageIdMultipleNeg, type LanguageIdSingle, type LanguageSetting, type LanguageSettingFilterFields, type LanguageSettingFilterFieldsDeprecated, type LanguageSettingFilterFieldsPreferred, type LegacySettings, type LocalId, type LocaleId, type MappedText, type MatchingFileType, type MergeSource, type MessageEmitter, type MessageType, type MessageTypeLookup, MessageTypes, type OverrideFilterFields, type OverrideSettings, type ParseResult, type ParsedTag, type ParsedTags, type ParsedText, type Parser, type ParserName, type ParserOptions, type Parsers, type Pattern, type PatternId, type PatternRef, type PnPSettings, type PredefinedPatterns, type ProgressBase, type ProgressEmitter, type ProgressFileBase, type ProgressFileBegin, type ProgressFileComplete, type ProgressItem, type ProgressTypes, type Range, type RegExpPatternDefinition, type RegExpPatternList, type ReplaceEntry, type ReplaceMap, type ReportIssueOptions, type ReporterConfiguration, type ReporterSettings, type ReportingConfiguration, type ResultEmitter, type RunResult, type Settings, type SimpleGlob, type SoftWordBreak, type SoftWordBreakDefinitions, type SoftWordBreakPattern, type SoftWordBreakRegExp, type SoftWordBreakRegExpString, type SoftWordBreakRule, type SoftWordBreaks, type Source, type SourceMap, type SpellingErrorEmitter, type SubstitutionDefinition, type SubstitutionDefinitions, type SubstitutionEntry, type SubstitutionID, type Substitutions, type SuggestionCostMapDef, type SuggestionCostsDefs, type SuggestionsConfiguration, type TagPattern, type TextDocument, type TextDocumentFragment, type TextDocumentOffset, type TextOffset, type TrustLevel, type UnknownWordsChoices, type UnknownWordsConfiguration, type ValidationTags, type Version, type VersionLatest, type VersionLegacy, type WordSegmentationSettings, type WorkspaceTrustSettings, defaultCSpellSettings, defineConfig, mergeConfig, unknownWordsChoices };
|
|
2227
|
+
export declare function defineConfig(config: AdvancedCSpellSettings): CSpellSettings;
|
|
2228
|
+
export declare function mergeConfig(settings: CSpellSettings[]): CSpellSettings;
|
|
2229
|
+
export declare function mergeConfig(...settings: [CSpellSettings, ...CSpellSettings[]]): CSpellSettings;
|
|
2230
|
+
export declare function mergeConfig(...settings: [CSpellSettings[], ...CSpellSettings[]]): CSpellSettings;
|
|
2231
|
+
export type { AdvancedCSpellSettings, AdvancedCSpellSettingsWithSourceTrace, AvailableParsers, BaseSetting, CSpellPackageSettings, CSpellPlugin, CSpellPlugin as Plugin, CSpellReporter, CSpellReporterEmitters, CSpellReporterModule, CSpellSettings, CSpellSettingsWithSourceTrace, CSpellUserSettings, CSpellUserSettingsFields, CSpellUserSettingsWithComments, CSpellVFS, CSpellVFSBinaryData, CSpellVFSData, CSpellVFSFile, CSpellVFSFileEntry, CSpellVFSFileUrl, CSpellVFSTextData, CacheFormat, CacheSettings, CacheStrategy, CharacterSet, CharacterSetCosts, CommandLineSettings, CreateParser, CustomDictionaryPath, CustomDictionaryScope, DebugEmitter, DictionaryDefinition, DictionaryDefinitionAlternate, DictionaryDefinitionAugmented, DictionaryDefinitionBase, DictionaryDefinitionCustom, DictionaryDefinitionInline, DictionaryDefinitionInlineFlagWords, DictionaryDefinitionInlineIgnoreWords, DictionaryDefinitionInlineWords, DictionaryDefinitionLegacy, DictionaryDefinitionPreferred, DictionaryDefinitionSimple, DictionaryFileTypes, DictionaryId, DictionaryInformation, DictionaryNegRef, DictionaryPath, DictionaryRef, DictionaryReference, DocumentParser, EditCosts, ErrorEmitter, ErrorLike, ExperimentalBaseSettings, ExperimentalFileSettings, ExtendableSettings, FSPathResolvable, Feature, Features, FeaturesSupportedByReporter, FileSettings, FileSource, FsPath, Glob, GlobDef, ImportFileRef, InMemorySource, Issue, LanguageId, LanguageIdMultiple, LanguageIdMultipleNeg, LanguageIdSingle, LanguageSetting, LanguageSettingFilterFields, LanguageSettingFilterFieldsDeprecated, LanguageSettingFilterFieldsPreferred, LegacySettings, LocalId, LocaleId, MappedText, MatchingFileType, MergeSource, MessageEmitter, MessageType, MessageTypeLookup, OverrideFilterFields, OverrideSettings, ParseResult, ParsedTag, ParsedTags, ParsedText, Parser, ParserName, ParserOptions, Parsers, Pattern, PatternId, PatternRef, PnPSettings, PredefinedPatterns, ProgressBase, ProgressEmitter, ProgressFileBase, ProgressFileBegin, ProgressFileComplete, ProgressItem, ProgressTypes, Range, RegExpPatternDefinition, RegExpPatternList, ReplaceEntry, ReplaceMap, ReportIssueOptions, ReporterConfiguration, ReporterSettings, ReportingConfiguration, ResultEmitter, RunResult, Settings, SimpleGlob, SoftWordBreak, SoftWordBreakDefinitions, SoftWordBreakPattern, SoftWordBreakRegExp, SoftWordBreakRegExpString, SoftWordBreakRule, SoftWordBreaks, Source, SourceMap, SpellingErrorEmitter, SubstitutionDefinition, SubstitutionDefinitions, SubstitutionEntry, SubstitutionID, Substitutions, SuggestionCostMapDef, SuggestionCostsDefs, SuggestionsConfiguration, TagPattern, TextDocument, TextDocumentFragment, TextDocumentOffset, TextOffset, TrustLevel, UnknownWordsChoices, UnknownWordsConfiguration, ValidationTags, Version, VersionLatest, VersionLegacy, WordSegmentationSettings, WorkspaceTrustSettings };
|
|
2264
2232
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
// src/configFields.ts
|
|
3
3
|
const ConfigFields = {
|
|
4
4
|
allowCompoundWords: "allowCompoundWords",
|
|
5
5
|
cache: "cache",
|
|
@@ -62,8 +62,7 @@ const ConfigFields = {
|
|
|
62
62
|
words: "words",
|
|
63
63
|
parser: "parser"
|
|
64
64
|
};
|
|
65
|
-
|
|
66
|
-
//#region src/CSpellReporter.ts
|
|
65
|
+
// src/CSpellReporter.ts
|
|
67
66
|
let IssueType = /* @__PURE__ */ function(IssueType) {
|
|
68
67
|
IssueType[IssueType["spelling"] = 0] = "spelling";
|
|
69
68
|
IssueType[IssueType["directive"] = 1] = "directive";
|
|
@@ -80,19 +79,16 @@ const unknownWordsChoices = {
|
|
|
80
79
|
ReportCommonTypos: "report-common-typos",
|
|
81
80
|
ReportFlagged: "report-flagged"
|
|
82
81
|
};
|
|
83
|
-
|
|
84
|
-
//#region src/defaultConfigSettings.ts
|
|
82
|
+
// src/defaultConfigSettings.ts
|
|
85
83
|
const defaultCSpellSettings = {
|
|
86
84
|
ignoreRandomStrings: true,
|
|
87
85
|
minRandomLength: 40
|
|
88
86
|
};
|
|
89
|
-
|
|
90
|
-
//#region src/defineConfig.ts
|
|
87
|
+
// src/defineConfig.ts
|
|
91
88
|
function defineConfig(config) {
|
|
92
89
|
return config;
|
|
93
90
|
}
|
|
94
|
-
|
|
95
|
-
//#region src/merge.ts
|
|
91
|
+
// src/merge.ts
|
|
96
92
|
/** Merge Append Arrays */
|
|
97
93
|
const mArr = mergeAppendArrays;
|
|
98
94
|
/** Merge Records */
|
|
@@ -209,7 +205,6 @@ function recKV(key, value) {
|
|
|
209
205
|
if (value === void 0) return void 0;
|
|
210
206
|
return { [key]: value };
|
|
211
207
|
}
|
|
212
|
-
//#endregion
|
|
213
208
|
exports.ConfigFields = ConfigFields;
|
|
214
209
|
exports.IssueType = IssueType;
|
|
215
210
|
exports.MessageTypes = MessageTypes;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/configFields.ts
|
|
2
2
|
const ConfigFields = {
|
|
3
3
|
allowCompoundWords: "allowCompoundWords",
|
|
4
4
|
cache: "cache",
|
|
@@ -61,8 +61,7 @@ const ConfigFields = {
|
|
|
61
61
|
words: "words",
|
|
62
62
|
parser: "parser"
|
|
63
63
|
};
|
|
64
|
-
|
|
65
|
-
//#region src/CSpellReporter.ts
|
|
64
|
+
// src/CSpellReporter.ts
|
|
66
65
|
let IssueType = /* @__PURE__ */ function(IssueType) {
|
|
67
66
|
IssueType[IssueType["spelling"] = 0] = "spelling";
|
|
68
67
|
IssueType[IssueType["directive"] = 1] = "directive";
|
|
@@ -79,19 +78,16 @@ const unknownWordsChoices = {
|
|
|
79
78
|
ReportCommonTypos: "report-common-typos",
|
|
80
79
|
ReportFlagged: "report-flagged"
|
|
81
80
|
};
|
|
82
|
-
|
|
83
|
-
//#region src/defaultConfigSettings.ts
|
|
81
|
+
// src/defaultConfigSettings.ts
|
|
84
82
|
const defaultCSpellSettings = {
|
|
85
83
|
ignoreRandomStrings: true,
|
|
86
84
|
minRandomLength: 40
|
|
87
85
|
};
|
|
88
|
-
|
|
89
|
-
//#region src/defineConfig.ts
|
|
86
|
+
// src/defineConfig.ts
|
|
90
87
|
function defineConfig(config) {
|
|
91
88
|
return config;
|
|
92
89
|
}
|
|
93
|
-
|
|
94
|
-
//#region src/merge.ts
|
|
90
|
+
// src/merge.ts
|
|
95
91
|
/** Merge Append Arrays */
|
|
96
92
|
const mArr = mergeAppendArrays;
|
|
97
93
|
/** Merge Records */
|
|
@@ -208,7 +204,6 @@ function recKV(key, value) {
|
|
|
208
204
|
if (value === void 0) return void 0;
|
|
209
205
|
return { [key]: value };
|
|
210
206
|
}
|
|
211
|
-
//#endregion
|
|
212
207
|
export { ConfigFields, IssueType, MessageTypes, defaultCSpellSettings, defineConfig, mergeConfig, unknownWordsChoices };
|
|
213
208
|
|
|
214
209
|
//# sourceMappingURL=index.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cspell/cspell-types",
|
|
3
|
-
"version": "10.4.
|
|
3
|
+
"version": "10.4.1",
|
|
4
4
|
"description": "Types for cspell and cspell-lib",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"engines": {
|
|
89
89
|
"node": ">=22.18.0"
|
|
90
90
|
},
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "ddb1699a4bfc2766675c2c97412a813d775772eb"
|
|
92
92
|
}
|