@cspell/cspell-types 5.16.0 → 5.18.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.
@@ -30,6 +30,32 @@
30
30
  ],
31
31
  "type": "string"
32
32
  },
33
+ "CharacterSet": {
34
+ "description": "This is a set of characters that can include `-` or `|`\n- `-` - indicates a range of characters: `a-c` => `abc`\n- `|` - is a group separator, indicating that the characters on either side are not related.",
35
+ "type": "string"
36
+ },
37
+ "CharacterSetCosts": {
38
+ "additionalProperties": false,
39
+ "properties": {
40
+ "characters": {
41
+ "$ref": "#/definitions/CharacterSet",
42
+ "description": "This is a set of characters that can include `-` or `|`\n- `-` - indicates a range of characters: `a-c` => `abc`\n- `|` - is a group separator, indicating that the characters on either side are not related."
43
+ },
44
+ "cost": {
45
+ "description": "the cost to insert / delete / replace / swap the characters in a group",
46
+ "type": "number"
47
+ },
48
+ "penalty": {
49
+ "description": "The penalty cost to apply if the accent is used. This is used to discourage",
50
+ "type": "number"
51
+ }
52
+ },
53
+ "required": [
54
+ "characters",
55
+ "cost"
56
+ ],
57
+ "type": "object"
58
+ },
33
59
  "CostMapDefInsDel": {
34
60
  "additionalProperties": false,
35
61
  "properties": {
@@ -154,6 +180,9 @@
154
180
  {
155
181
  "$ref": "#/definitions/DictionaryDefinitionCustom"
156
182
  },
183
+ {
184
+ "$ref": "#/definitions/DictionaryDefinitionAugmented"
185
+ },
157
186
  {
158
187
  "$ref": "#/definitions/DictionaryDefinitionAlternate"
159
188
  }
@@ -187,10 +216,6 @@
187
216
  "$ref": "#/definitions/ReplaceMap",
188
217
  "description": "Replacement pairs."
189
218
  },
190
- "suggestionEditCosts": {
191
- "$ref": "#/definitions/SuggestionCostsDefs",
192
- "description": "Used in making suggestions. The lower the value, the more likely the suggestion will be near the top of the suggestion list.\n\nAdded with `v5.16.0`."
193
- },
194
219
  "type": {
195
220
  "$ref": "#/definitions/DictionaryFileTypes",
196
221
  "default": "S",
@@ -207,6 +232,49 @@
207
232
  ],
208
233
  "type": "object"
209
234
  },
235
+ "DictionaryDefinitionAugmented": {
236
+ "additionalProperties": false,
237
+ "description": "Used to provide extra data related to the dictionary",
238
+ "properties": {
239
+ "description": {
240
+ "description": "Optional description.",
241
+ "type": "string"
242
+ },
243
+ "dictionaryInformation": {
244
+ "$ref": "#/definitions/DictionaryInformation"
245
+ },
246
+ "name": {
247
+ "$ref": "#/definitions/DictionaryId",
248
+ "description": "This is the name of a dictionary.\n\nName Format:\n- Must contain at least 1 number or letter.\n- Spaces are allowed.\n- Leading and trailing space will be removed.\n- Names ARE case-sensitive.\n- Must not contain `*`, `!`, `;`, `,`, `{`, `}`, `[`, `]`, `~`."
249
+ },
250
+ "noSuggest": {
251
+ "description": "Indicate that suggestions should not come from this dictionary. Words in this dictionary are considered correct, but will not be used when making spell correction suggestions.\n\nNote: if a word is suggested by another dictionary, but found in this dictionary, it will be removed from the set of possible suggestions.",
252
+ "type": "boolean"
253
+ },
254
+ "path": {
255
+ "$ref": "#/definitions/DictionaryPath",
256
+ "description": "Path to the file."
257
+ },
258
+ "repMap": {
259
+ "$ref": "#/definitions/ReplaceMap",
260
+ "description": "Replacement pairs."
261
+ },
262
+ "type": {
263
+ "$ref": "#/definitions/DictionaryFileTypes",
264
+ "default": "S",
265
+ "description": "Type of file: S - single word per line, W - each line can contain one or more words separated by space, C - each line is treated like code (Camel Case is allowed). Default is S. C is the slowest to load due to the need to split each line based upon code splitting rules."
266
+ },
267
+ "useCompounds": {
268
+ "description": "Use Compounds.",
269
+ "type": "boolean"
270
+ }
271
+ },
272
+ "required": [
273
+ "name",
274
+ "path"
275
+ ],
276
+ "type": "object"
277
+ },
210
278
  "DictionaryDefinitionCustom": {
211
279
  "additionalProperties": false,
212
280
  "description": "For Defining Custom dictionaries. They are generally scoped to a `user`, `workspace`, or `folder`. When `addWords` is true, indicates that the spell checker can add words to the file. Note: only plain text files with one word per line are supported at this moment.",
@@ -249,10 +317,6 @@
249
317
  ],
250
318
  "description": "Defines the scope for when words will be added to the dictionary. Scope values: `user`, `workspace`, `folder`."
251
319
  },
252
- "suggestionEditCosts": {
253
- "$ref": "#/definitions/SuggestionCostsDefs",
254
- "description": "Used in making suggestions. The lower the value, the more likely the suggestion will be near the top of the suggestion list.\n\nAdded with `v5.16.0`."
255
- },
256
320
  "type": {
257
321
  "$ref": "#/definitions/DictionaryFileTypes",
258
322
  "default": "S",
@@ -293,10 +357,6 @@
293
357
  "$ref": "#/definitions/ReplaceMap",
294
358
  "description": "Replacement pairs."
295
359
  },
296
- "suggestionEditCosts": {
297
- "$ref": "#/definitions/SuggestionCostsDefs",
298
- "description": "Used in making suggestions. The lower the value, the more likely the suggestion will be near the top of the suggestion list.\n\nAdded with `v5.16.0`."
299
- },
300
360
  "type": {
301
361
  "$ref": "#/definitions/DictionaryFileTypes",
302
362
  "default": "S",
@@ -327,6 +387,59 @@
327
387
  "pattern": "^(?=[^!*,;{}[\\]~\\n]+$)(?=(.*\\w)).+$",
328
388
  "type": "string"
329
389
  },
390
+ "DictionaryInformation": {
391
+ "additionalProperties": false,
392
+ "description": "Use by dictionary authors to help improve the quality of suggestions given from the dictionary.\n\nAdded with `v5.16.0`.",
393
+ "properties": {
394
+ "accents": {
395
+ "anyOf": [
396
+ {
397
+ "$ref": "#/definitions/CharacterSet"
398
+ },
399
+ {
400
+ "items": {
401
+ "$ref": "#/definitions/CharacterSetCosts"
402
+ },
403
+ "type": "array"
404
+ }
405
+ ],
406
+ "default": "̀-́",
407
+ "description": "The accent characters"
408
+ },
409
+ "alphabet": {
410
+ "anyOf": [
411
+ {
412
+ "$ref": "#/definitions/CharacterSet"
413
+ },
414
+ {
415
+ "items": {
416
+ "$ref": "#/definitions/CharacterSetCosts"
417
+ },
418
+ "type": "array"
419
+ }
420
+ ],
421
+ "default": "a-zA-Z",
422
+ "description": "The alphabet to use."
423
+ },
424
+ "costs": {
425
+ "$ref": "#/definitions/EditCosts",
426
+ "description": "Define edit costs."
427
+ },
428
+ "hunspellInformation": {
429
+ "$ref": "#/definitions/HunspellInformation",
430
+ "description": "Used by dictionary authors"
431
+ },
432
+ "locale": {
433
+ "description": "The locale of the dictionary. Example: `nl,nl-be`",
434
+ "type": "string"
435
+ },
436
+ "suggestionEditCosts": {
437
+ "$ref": "#/definitions/SuggestionCostsDefs",
438
+ "description": "Used in making suggestions. The lower the value, the more likely the suggestion will be near the top of the suggestion list."
439
+ }
440
+ },
441
+ "type": "object"
442
+ },
330
443
  "DictionaryNegRef": {
331
444
  "description": "This a negative reference to a named dictionary.\n\nIt is used to exclude or include a dictionary by name.\n\nThe reference starts with 1 or more `!`.\n- `!<dictionary_name>` - Used to exclude the dictionary matching `<dictionary_name>`.\n- `!!<dictionary_name>` - Used to re-include a dictionary matching `<dictionary_name>`. Overrides `!<dictionary_name>`.\n- `!!!<dictionary_name>` - Used to exclude a dictionary matching `<dictionary_name>`. Overrides `!!<dictionary_name>`.",
332
445
  "pattern": "^(?=!+[^!*,;{}[\\]~\\n]+$)(?=(.*\\w)).+$",
@@ -352,6 +465,37 @@
352
465
  ],
353
466
  "description": "Reference to a dictionary by name. One of:\n- {@link DictionaryRef } \n- {@link DictionaryNegRef }"
354
467
  },
468
+ "EditCosts": {
469
+ "additionalProperties": false,
470
+ "properties": {
471
+ "accentCosts": {
472
+ "default": 1,
473
+ "description": "The cost to add / remove an accent This should be very cheap, it helps with fixing accent issues.",
474
+ "type": "number"
475
+ },
476
+ "baseCost": {
477
+ "default": 100,
478
+ "description": "This is the base cost for making an edit.",
479
+ "type": "number"
480
+ },
481
+ "capsCosts": {
482
+ "default": 1,
483
+ "description": "The cost to change capitalization. This should be very cheap, it helps with fixing capitalization issues.",
484
+ "type": "number"
485
+ },
486
+ "firstLetterPenalty": {
487
+ "default": 4,
488
+ "description": "The extra cost incurred for changing the first letter of a word. This value should be less than `100 - baseCost`.",
489
+ "type": "number"
490
+ },
491
+ "nonAlphabetCosts": {
492
+ "default": 110,
493
+ "description": "This is the cost for characters not in the alphabet.",
494
+ "type": "number"
495
+ }
496
+ },
497
+ "type": "object"
498
+ },
355
499
  "FSPathResolvable": {
356
500
  "$ref": "#/definitions/FsPath",
357
501
  "description": "A File System Path.\n\nSpecial Properties:\n- `${cwd}` prefix - will be replaced with the current working directory.\n- Relative paths are relative to the configuration file."
@@ -378,6 +522,75 @@
378
522
  "$ref": "#/definitions/SimpleGlob",
379
523
  "description": "These are glob expressions."
380
524
  },
525
+ "HunspellInformation": {
526
+ "additionalProperties": false,
527
+ "properties": {
528
+ "aff": {
529
+ "description": "Selected Hunspell AFF content. The content must be UTF-8\n\nSections:\n- TRY\n- MAP\n- REP\n- KEY\n- ICONV\n- OCONV\n\nExample: ```hunspell # Comment TRY aeistlunkodmrvpgjhäõbüoöfcwzxðqþ` MAP aàâäAÀÂÄ MAP eéèêëEÉÈÊË MAP iîïyIÎÏY MAP oôöOÔÖ MAP (IJ)(IJ) ```",
530
+ "type": "string"
531
+ },
532
+ "costs": {
533
+ "additionalProperties": false,
534
+ "description": "The costs to apply when using the hunspell settings",
535
+ "properties": {
536
+ "accentCosts": {
537
+ "default": 1,
538
+ "description": "The cost to add / remove an accent This should be very cheap, it helps with fixing accent issues.",
539
+ "type": "number"
540
+ },
541
+ "baseCost": {
542
+ "default": 100,
543
+ "description": "This is the base cost for making an edit.",
544
+ "type": "number"
545
+ },
546
+ "capsCosts": {
547
+ "default": 1,
548
+ "description": "The cost to change capitalization. This should be very cheap, it helps with fixing capitalization issues.",
549
+ "type": "number"
550
+ },
551
+ "firstLetterPenalty": {
552
+ "default": 4,
553
+ "description": "The extra cost incurred for changing the first letter of a word. This value should be less than `100 - baseCost`.",
554
+ "type": "number"
555
+ },
556
+ "ioConvertCost": {
557
+ "default": 30,
558
+ "description": "The cost to convert between convert pairs.\n\nThe value should be slightly higher than the mapCost.",
559
+ "type": "number"
560
+ },
561
+ "keyboardCost": {
562
+ "default": 99,
563
+ "description": "The cost of replacing or swapping any adjacent keyboard characters.\n\nThis should be slightly cheaper than `tryCharCost`.",
564
+ "type": "number"
565
+ },
566
+ "mapCost": {
567
+ "default": 25,
568
+ "description": "mapSet replacement cost is the cost to substitute one character with another from the same set.\n\nMap characters are considered very similar to each other and are often the cause of simple mistakes.",
569
+ "type": "number"
570
+ },
571
+ "nonAlphabetCosts": {
572
+ "default": 110,
573
+ "description": "This is the cost for characters not in the alphabet.",
574
+ "type": "number"
575
+ },
576
+ "replaceCosts": {
577
+ "default": 75,
578
+ "description": "The cost to substitute pairs found in the replace settings.",
579
+ "type": "number"
580
+ },
581
+ "tryCharCost": {
582
+ "description": "The cost of inserting / deleting / or swapping any `tryChars` Defaults to `baseCosts`",
583
+ "type": "number"
584
+ }
585
+ },
586
+ "type": "object"
587
+ }
588
+ },
589
+ "required": [
590
+ "aff"
591
+ ],
592
+ "type": "object"
593
+ },
381
594
  "LanguageId": {
382
595
  "anyOf": [
383
596
  {
@@ -976,6 +1189,11 @@
976
1189
  },
977
1190
  "type": "array"
978
1191
  },
1192
+ "failFast": {
1193
+ "default": false,
1194
+ "description": "Exit with non-zero code as soon as an issue/error is encountered (useful for CI or git hooks)",
1195
+ "type": "boolean"
1196
+ },
979
1197
  "features": {
980
1198
  "$ref": "#/definitions/Features",
981
1199
  "description": "Configure CSpell features.\n\n- Added with `v5.16.0`."
@@ -1,5 +1,5 @@
1
- import { Features } from './features';
2
- import type { SuggestionCostsDefs } from './suggestionCostsDef';
1
+ import type { DictionaryInformation } from './DictionaryInformation';
2
+ import type { Features } from './features';
3
3
  export declare type ReplaceEntry = [string, string];
4
4
  export declare type ReplaceMap = ReplaceEntry[];
5
5
  /**
@@ -227,6 +227,11 @@ export interface CommandLineSettings {
227
227
  * Define cache settings.
228
228
  */
229
229
  cache?: CacheSettings;
230
+ /**
231
+ * Exit with non-zero code as soon as an issue/error is encountered (useful for CI or git hooks)
232
+ * @default false
233
+ */
234
+ failFast?: boolean;
230
235
  }
231
236
  /**
232
237
  * To prevent the unwanted execution of untrusted code, WorkspaceTrustSettings
@@ -346,7 +351,7 @@ export interface BaseSetting {
346
351
  patterns?: RegExpPatternDefinition[];
347
352
  }
348
353
  export declare type DictionaryFileTypes = 'S' | 'W' | 'C' | 'T';
349
- export declare type DictionaryDefinition = DictionaryDefinitionPreferred | DictionaryDefinitionCustom | DictionaryDefinitionAlternate | DictionaryDefinitionLegacy;
354
+ export declare type DictionaryDefinition = DictionaryDefinitionPreferred | DictionaryDefinitionCustom | DictionaryDefinitionAugmented | DictionaryDefinitionAlternate | DictionaryDefinitionLegacy;
350
355
  export interface DictionaryDefinitionBase {
351
356
  /**
352
357
  * This is the name of a dictionary.
@@ -385,13 +390,6 @@ export interface DictionaryDefinitionBase {
385
390
  * @default "S"
386
391
  */
387
392
  type?: DictionaryFileTypes;
388
- /**
389
- * Used in making suggestions. The lower the value, the more likely the suggestion
390
- * will be near the top of the suggestion list.
391
- *
392
- * Added with `v5.16.0`.
393
- */
394
- suggestionEditCosts?: SuggestionCostsDefs;
395
393
  }
396
394
  export interface DictionaryDefinitionPreferred extends DictionaryDefinitionBase {
397
395
  /** Path to the file. */
@@ -404,6 +402,12 @@ export interface DictionaryDefinitionPreferred extends DictionaryDefinitionBase
404
402
  */
405
403
  file?: undefined;
406
404
  }
405
+ /**
406
+ * Used to provide extra data related to the dictionary
407
+ */
408
+ export interface DictionaryDefinitionAugmented extends DictionaryDefinitionPreferred {
409
+ dictionaryInformation?: DictionaryInformation;
410
+ }
407
411
  /**
408
412
  * Only for legacy dictionary definitions.
409
413
  * @deprecated true
@@ -418,6 +422,8 @@ export interface DictionaryDefinitionAlternate extends DictionaryDefinitionBase
418
422
  * @deprecationMessage Use `path` instead.
419
423
  */
420
424
  file: DictionaryPath;
425
+ /** @hidden */
426
+ suggestionEditCosts?: undefined;
421
427
  }
422
428
  /**
423
429
  * @deprecated true
@@ -442,6 +448,10 @@ export interface DictionaryDefinitionLegacy extends DictionaryDefinitionBase {
442
448
  * @default "S"
443
449
  */
444
450
  type?: DictionaryFileTypes;
451
+ /**
452
+ * @hidden
453
+ */
454
+ suggestionEditCosts?: undefined;
445
455
  }
446
456
  /**
447
457
  * Specifies the scope of a dictionary.
@@ -0,0 +1,286 @@
1
+ import { SuggestionCostsDefs } from './suggestionCostsDef';
2
+ /**
3
+ * Use by dictionary authors to help improve the quality of suggestions
4
+ * given from the dictionary.
5
+ *
6
+ * Added with `v5.16.0`.
7
+ */
8
+ export interface DictionaryInformation {
9
+ /**
10
+ * The locale of the dictionary.
11
+ * Example: `nl,nl-be`
12
+ */
13
+ locale?: string;
14
+ /**
15
+ * The alphabet to use.
16
+ * @default "a-zA-Z"
17
+ */
18
+ alphabet?: CharacterSet | CharacterSetCosts[];
19
+ /**
20
+ * The accent characters
21
+ * @default "\u0300-\u0341"
22
+ */
23
+ accents?: CharacterSet | CharacterSetCosts[];
24
+ /**
25
+ * Define edit costs.
26
+ */
27
+ costs?: EditCosts;
28
+ /**
29
+ * Used in making suggestions. The lower the value, the more likely the suggestion
30
+ * will be near the top of the suggestion list.
31
+ */
32
+ suggestionEditCosts?: SuggestionCostsDefs | undefined;
33
+ /**
34
+ * Used by dictionary authors
35
+ */
36
+ hunspellInformation?: HunspellInformation;
37
+ }
38
+ export interface HunspellInformationParsed {
39
+ /**
40
+ * This is generally the alphabet used in the dictionary.
41
+ * It stands for the characters to try using for substitutions
42
+ * when looking for a suggestions.
43
+ *
44
+ * Example:
45
+ * - Hunspell:
46
+ * ```hunspell
47
+ * TRY aeistlunkodmrvpgjhäõbüoöfcwzxðqþ`
48
+ * ```
49
+ * - Use: yaml
50
+ * ```yaml
51
+ * tryChars: "aeistlunkodmrvpgjhäõbüoöfcwzxðqþ"
52
+ * ```
53
+ * <!--- cspell:ignore aeistlunkodmrvpgjhäõbüoöfcwzxðqþ --
54
+ */
55
+ tryChars?: string;
56
+ /**
57
+ * This defines characters that are good substitutes for each other.
58
+ * - A `()` is need for multi character sequences like letters with multiple accents.
59
+ * - Separate unrelated characters with `|` or `\n`
60
+ *
61
+ * Example:
62
+ * - Hunspell:
63
+ * ```hunspell
64
+ * MAP aàâäAÀÂÄ
65
+ * MAP eéèêëEÉÈÊË
66
+ * MAP iîïyIÎÏY
67
+ * MAP oôöOÔÖ
68
+ * MAP (IJ)(IJ)
69
+ * ```
70
+ * - Use:
71
+ * `yaml`
72
+ * ```yaml
73
+ * mapSets: |
74
+ * aàâäAÀÂÄ|eéèêëEÉÈÊË`
75
+ * eéèêëEÉÈÊË|iîïyIÎÏY
76
+ * oôöOÔÖ|(IJ)(IJ)
77
+ * ```
78
+ * <!--- cspell:ignore aàâä eéèêë iîïy -->
79
+ */
80
+ mapSets?: string | string[];
81
+ /**
82
+ * This represents the layout of a common keyboard.
83
+ * Used for adjacency mistakes.
84
+ *
85
+ * Hunspell:
86
+ * ```hunspell
87
+ * KEY qwertyuiop|asdfghjkl|zxcvbnm
88
+ * ```
89
+ * Use:
90
+ * ```yaml
91
+ * keyboard: qwertyuiop|asdfghjkl|zxcvbnm
92
+ * ```
93
+ * <!--- cspell:ignore asdfghjkl qwertyuiop zxcvbnm -->
94
+ */
95
+ keyboard?: string;
96
+ /**
97
+ * Output Conversions
98
+ *
99
+ */
100
+ outConvert?: string | string[];
101
+ inConvert?: string | string[];
102
+ /**
103
+ * Common Substitutions.
104
+ * Special characters:
105
+ * - `^` - matches the beginning of a word.
106
+ * - `$` - matches the end of a word.
107
+ *
108
+ * Hunspell:
109
+ * ```hunspell
110
+ * REP c ss
111
+ * REP e ij
112
+ * REP é ee
113
+ * REP g ch
114
+ * REP ï ii
115
+ * REP t d # gebiest=>gebiesd
116
+ * REP u ij
117
+ * ```
118
+ *
119
+ * Use:
120
+ * ```yaml
121
+ * replace: |
122
+ * c ss
123
+ * e ij
124
+ * é ee
125
+ * g ch
126
+ * ï ii
127
+ * t d
128
+ * u ij
129
+ * ```
130
+ *
131
+ * <!--- cspell:ignore gebiesd gebiest -->
132
+ */
133
+ replace?: string | string[];
134
+ /** The costs to apply when using the hunspell settings */
135
+ costs?: HunspellCosts;
136
+ }
137
+ export interface HunspellInformation {
138
+ /**
139
+ * Selected Hunspell AFF content.
140
+ * The content must be UTF-8
141
+ *
142
+ * Sections:
143
+ * - TRY
144
+ * - MAP
145
+ * - REP
146
+ * - KEY
147
+ * - ICONV
148
+ * - OCONV
149
+ *
150
+ * Example:
151
+ * ```hunspell
152
+ * # Comment
153
+ * TRY aeistlunkodmrvpgjhäõbüoöfcwzxðqþ`
154
+ * MAP aàâäAÀÂÄ
155
+ * MAP eéèêëEÉÈÊË
156
+ * MAP iîïyIÎÏY
157
+ * MAP oôöOÔÖ
158
+ * MAP (IJ)(IJ)
159
+ * ```
160
+ */
161
+ aff: HunspellAffContent;
162
+ /** The costs to apply when using the hunspell settings */
163
+ costs?: HunspellCosts;
164
+ }
165
+ /**
166
+ * Selected Hunspell AFF content.
167
+ * The content must be UTF-8
168
+ *
169
+ * Sections:
170
+ * - TRY
171
+ * - NO-TRY
172
+ * - MAP
173
+ * - REP
174
+ * - KEY
175
+ * - ICONV
176
+ * - OCONV
177
+ *
178
+ * Example:
179
+ * ```hunspell
180
+ * # Comment
181
+ * TRY aeistlunkodmrvpgjhäõbüoöfcwzxðqþ`
182
+ * NO-TRY -0123456789 # Discourage adding numbers and dashes.
183
+ * MAP aàâäAÀÂÄ
184
+ * MAP eéèêëEÉÈÊË
185
+ * MAP iîïyIÎÏY
186
+ * MAP oôöOÔÖ
187
+ * MAP (IJ)(IJ)
188
+ * ```
189
+ */
190
+ declare type HunspellAffContent = string;
191
+ interface HunspellCosts extends EditCosts {
192
+ /**
193
+ * The cost of inserting / deleting / or swapping any `tryChars`
194
+ * Defaults to `baseCosts`
195
+ */
196
+ tryCharCost?: number;
197
+ /**
198
+ * The cost of replacing or swapping any adjacent keyboard characters.
199
+ *
200
+ * This should be slightly cheaper than `tryCharCost`.
201
+ * @default 99
202
+ */
203
+ keyboardCost?: number;
204
+ /**
205
+ * mapSet replacement cost is the cost to substitute one character with another from
206
+ * the same set.
207
+ *
208
+ * Map characters are considered very similar to each other and are often
209
+ * the cause of simple mistakes.
210
+ *
211
+ * @default 25
212
+ */
213
+ mapCost?: number;
214
+ /**
215
+ * The cost to convert between convert pairs.
216
+ *
217
+ * The value should be slightly higher than the mapCost.
218
+ *
219
+ * @default 30
220
+ */
221
+ ioConvertCost?: number;
222
+ /**
223
+ * The cost to substitute pairs found in the replace settings.
224
+ *
225
+ * @default 75
226
+ */
227
+ replaceCosts?: number;
228
+ }
229
+ /**
230
+ *
231
+ */
232
+ export interface EditCosts {
233
+ /**
234
+ * This is the base cost for making an edit.
235
+ * @default 100
236
+ */
237
+ baseCost?: number;
238
+ /**
239
+ * This is the cost for characters not in the alphabet.
240
+ * @default 110
241
+ */
242
+ nonAlphabetCosts?: number;
243
+ /**
244
+ * The extra cost incurred for changing the first letter of a word.
245
+ * This value should be less than `100 - baseCost`.
246
+ * @default 4
247
+ */
248
+ firstLetterPenalty?: number;
249
+ /**
250
+ * The cost to change capitalization.
251
+ * This should be very cheap, it helps with fixing capitalization issues.
252
+ * @default 1
253
+ */
254
+ capsCosts?: number;
255
+ /**
256
+ * The cost to add / remove an accent
257
+ * This should be very cheap, it helps with fixing accent issues.
258
+ * @default 1
259
+ */
260
+ accentCosts?: number;
261
+ }
262
+ /**
263
+ * This is a set of characters that can include `-` or `|`
264
+ * - `-` - indicates a range of characters: `a-c` => `abc`
265
+ * - `|` - is a group separator, indicating that the characters on either side
266
+ * are not related.
267
+ */
268
+ export declare type CharacterSet = string;
269
+ export interface CharacterSetCosts {
270
+ /**
271
+ * This is a set of characters that can include `-` or `|`
272
+ * - `-` - indicates a range of characters: `a-c` => `abc`
273
+ * - `|` - is a group separator, indicating that the characters on either side
274
+ * are not related.
275
+ */
276
+ characters: CharacterSet;
277
+ /** the cost to insert / delete / replace / swap the characters in a group */
278
+ cost: number;
279
+ /**
280
+ * The penalty cost to apply if the accent is used.
281
+ * This is used to discourage
282
+ */
283
+ penalty?: number;
284
+ }
285
+ export {};
286
+ //# sourceMappingURL=DictionaryInformation.d.ts.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=DictionaryInformation.js.map
@@ -12,6 +12,7 @@ exports.ConfigFields = {
12
12
  enabledLanguageIds: 'enabledLanguageIds',
13
13
  enableFiletypes: 'enableFiletypes',
14
14
  enableGlobDot: 'enableGlobDot',
15
+ failFast: 'failFast',
15
16
  features: 'features',
16
17
  files: 'files',
17
18
  flagWords: 'flagWords',
@@ -1,5 +1,5 @@
1
1
  /**
2
- * These are experimental features and are subject to change or removal.
2
+ * These are experimental features and are subject to change or removal without notice.
3
3
  */
4
4
  export interface FeaturesExperimental {
5
5
  /**
package/dist/index.d.ts CHANGED
@@ -2,7 +2,8 @@ export { ConfigFields } from './configFields';
2
2
  export type { CSpellUserSettingsFields } from './configFields';
3
3
  export * from './CSpellReporter';
4
4
  export * from './CSpellSettingsDef';
5
+ export type { CharacterSet, CharacterSetCosts, DictionaryInformation, EditCosts } from './DictionaryInformation';
6
+ export type { Feature, Features } from './features';
5
7
  export type { SuggestionCostMapDef, SuggestionCostsDefs } from './suggestionCostsDef';
6
8
  export type { TextDocumentOffset, TextOffset } from './TextOffset';
7
- export type { Features, Feature } from './features';
8
9
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "5.16.0",
6
+ "version": "5.18.0",
7
7
  "description": "Types for cspell and cspell-lib",
8
8
  "main": "dist/index.js",
9
9
  "typings": "dist/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "build": "npm run compile && npm run build-schema",
19
19
  "build-dev": "tsc -p tsconfig.dev.json",
20
20
  "build-schema": "ts-json-schema-generator --no-top-ref --path src/CSpellSettingsDef.ts --type CSpellSettings --validation-keywords markdownDescription --validation-keywords scope --validation-keywords deprecated --validation-keywords deprecationMessage -o ./cspell.schema.json && cp ./cspell.schema.json ../..",
21
- "build-docs": "typedoc --out ../../docs/types/cspell-types src/index.ts",
21
+ "build-docs": "rimraf ../../docs/types/cspell-types && typedoc --out ../../docs/types/cspell-types src/index.ts",
22
22
  "test-build-docs": "typedoc --out ./temp/docs src/index.ts",
23
23
  "clean-build": "npm run clean && npm run build",
24
24
  "compile": "tsc -p .",
@@ -55,7 +55,7 @@
55
55
  "ts-json-schema-generator": "^0.97.0",
56
56
  "typedoc": "0.22.11",
57
57
  "typedoc-plugin-markdown": "^3.11.12",
58
- "typescript": "^4.5.4"
58
+ "typescript": "^4.5.5"
59
59
  },
60
- "gitHead": "c5d994f58bdb48c4d16f1708607b28c8a7b52a65"
60
+ "gitHead": "ef4c46dfb6f2938724afb5332ea2fdf9b67d99e4"
61
61
  }