@cspell/cspell-types 7.0.2 → 7.2.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.
Files changed (83) hide show
  1. package/dist/Parser/index.d.mts +2 -0
  2. package/dist/Parser/index.mjs +2 -0
  3. package/dist/index.d.mts +2 -0
  4. package/dist/index.mjs +2 -0
  5. package/package.json +19 -16
  6. package/dist/esm/CSpellReporter.d.mts +0 -152
  7. package/dist/esm/CSpellReporter.d.ts +0 -152
  8. package/dist/esm/CSpellReporter.js +0 -10
  9. package/dist/esm/CSpellReporter.mjs +0 -10
  10. package/dist/esm/CSpellSettingsDef.d.mts +0 -705
  11. package/dist/esm/CSpellSettingsDef.d.ts +0 -705
  12. package/dist/esm/CSpellSettingsDef.js +0 -1
  13. package/dist/esm/CSpellSettingsDef.mjs +0 -1
  14. package/dist/esm/DictionaryDefinition.d.mts +0 -219
  15. package/dist/esm/DictionaryDefinition.d.ts +0 -219
  16. package/dist/esm/DictionaryDefinition.js +0 -1
  17. package/dist/esm/DictionaryDefinition.mjs +0 -1
  18. package/dist/esm/DictionaryInformation.d.mts +0 -210
  19. package/dist/esm/DictionaryInformation.d.ts +0 -210
  20. package/dist/esm/DictionaryInformation.js +0 -1
  21. package/dist/esm/DictionaryInformation.mjs +0 -1
  22. package/dist/esm/InlineDictionary.d.mts +0 -44
  23. package/dist/esm/InlineDictionary.d.ts +0 -44
  24. package/dist/esm/InlineDictionary.js +0 -1
  25. package/dist/esm/InlineDictionary.mjs +0 -1
  26. package/dist/esm/Parser/index.d.mts +0 -126
  27. package/dist/esm/Parser/index.d.ts +0 -126
  28. package/dist/esm/Parser/index.js +0 -1
  29. package/dist/esm/Parser/index.mjs +0 -1
  30. package/dist/esm/TextMap.d.mts +0 -36
  31. package/dist/esm/TextMap.d.ts +0 -36
  32. package/dist/esm/TextMap.js +0 -1
  33. package/dist/esm/TextMap.mjs +0 -1
  34. package/dist/esm/TextOffset.d.mts +0 -23
  35. package/dist/esm/TextOffset.d.ts +0 -23
  36. package/dist/esm/TextOffset.js +0 -1
  37. package/dist/esm/TextOffset.mjs +0 -1
  38. package/dist/esm/configFields.d.mts +0 -7
  39. package/dist/esm/configFields.d.ts +0 -7
  40. package/dist/esm/configFields.js +0 -52
  41. package/dist/esm/configFields.mjs +0 -52
  42. package/dist/esm/features.d.mts +0 -38
  43. package/dist/esm/features.d.ts +0 -38
  44. package/dist/esm/features.js +0 -2
  45. package/dist/esm/features.mjs +0 -2
  46. package/dist/esm/index.d.mts +0 -13
  47. package/dist/esm/index.d.ts +0 -13
  48. package/dist/esm/index.js +0 -2
  49. package/dist/esm/index.mjs +0 -2
  50. package/dist/esm/suggestionCostsDef.d.mts +0 -88
  51. package/dist/esm/suggestionCostsDef.d.ts +0 -88
  52. package/dist/esm/suggestionCostsDef.js +0 -1
  53. package/dist/esm/suggestionCostsDef.mjs +0 -1
  54. package/dist/esm/types.d.mts +0 -9
  55. package/dist/esm/types.d.ts +0 -9
  56. package/dist/esm/types.js +0 -3
  57. package/dist/esm/types.mjs +0 -3
  58. /package/dist/{cjs/CSpellReporter.d.ts → CSpellReporter.d.ts} +0 -0
  59. /package/dist/{cjs/CSpellReporter.js → CSpellReporter.js} +0 -0
  60. /package/dist/{cjs/CSpellSettingsDef.d.ts → CSpellSettingsDef.d.ts} +0 -0
  61. /package/dist/{cjs/CSpellSettingsDef.js → CSpellSettingsDef.js} +0 -0
  62. /package/dist/{cjs/DictionaryDefinition.d.ts → DictionaryDefinition.d.ts} +0 -0
  63. /package/dist/{cjs/DictionaryDefinition.js → DictionaryDefinition.js} +0 -0
  64. /package/dist/{cjs/DictionaryInformation.d.ts → DictionaryInformation.d.ts} +0 -0
  65. /package/dist/{cjs/DictionaryInformation.js → DictionaryInformation.js} +0 -0
  66. /package/dist/{cjs/InlineDictionary.d.ts → InlineDictionary.d.ts} +0 -0
  67. /package/dist/{cjs/InlineDictionary.js → InlineDictionary.js} +0 -0
  68. /package/dist/{cjs/Parser → Parser}/index.d.ts +0 -0
  69. /package/dist/{cjs/Parser → Parser}/index.js +0 -0
  70. /package/dist/{cjs/TextMap.d.ts → TextMap.d.ts} +0 -0
  71. /package/dist/{cjs/TextMap.js → TextMap.js} +0 -0
  72. /package/dist/{cjs/TextOffset.d.ts → TextOffset.d.ts} +0 -0
  73. /package/dist/{cjs/TextOffset.js → TextOffset.js} +0 -0
  74. /package/dist/{cjs/configFields.d.ts → configFields.d.ts} +0 -0
  75. /package/dist/{cjs/configFields.js → configFields.js} +0 -0
  76. /package/dist/{cjs/features.d.ts → features.d.ts} +0 -0
  77. /package/dist/{cjs/features.js → features.js} +0 -0
  78. /package/dist/{cjs/index.d.ts → index.d.ts} +0 -0
  79. /package/dist/{cjs/index.js → index.js} +0 -0
  80. /package/dist/{cjs/suggestionCostsDef.d.ts → suggestionCostsDef.d.ts} +0 -0
  81. /package/dist/{cjs/suggestionCostsDef.js → suggestionCostsDef.js} +0 -0
  82. /package/dist/{cjs/types.d.ts → types.d.ts} +0 -0
  83. /package/dist/{cjs/types.js → types.js} +0 -0
@@ -1,219 +0,0 @@
1
- import type { DictionaryInformation } from './DictionaryInformation.mjs';
2
- import type { InlineDictionary } from './InlineDictionary.mjs';
3
- export type DictionaryDefinition = DictionaryDefinitionPreferred | DictionaryDefinitionCustom | DictionaryDefinitionAugmented | DictionaryDefinitionInline | DictionaryDefinitionAlternate | DictionaryDefinitionLegacy;
4
- export type DictionaryFileTypes = 'S' | 'W' | 'C' | 'T';
5
- export interface DictionaryDefinitionBase {
6
- /**
7
- * This is the name of a dictionary.
8
- *
9
- * Name Format:
10
- * - Must contain at least 1 number or letter.
11
- * - Spaces are allowed.
12
- * - Leading and trailing space will be removed.
13
- * - Names ARE case-sensitive.
14
- * - Must not contain `*`, `!`, `;`, `,`, `{`, `}`, `[`, `]`, `~`.
15
- */
16
- name: DictionaryId;
17
- /** Optional description. */
18
- description?: string;
19
- /** Replacement pairs. */
20
- repMap?: ReplaceMap;
21
- /** Use Compounds. */
22
- useCompounds?: boolean;
23
- /**
24
- * Indicate that suggestions should not come from this dictionary.
25
- * Words in this dictionary are considered correct, but will not be
26
- * used when making spell correction suggestions.
27
- *
28
- * Note: if a word is suggested by another dictionary, but found in
29
- * this dictionary, it will be removed from the set of
30
- * possible suggestions.
31
- */
32
- noSuggest?: boolean;
33
- /**
34
- * Type of file:
35
- * S - single word per line,
36
- * W - each line can contain one or more words separated by space,
37
- * C - each line is treated like code (Camel Case is allowed).
38
- * Default is S.
39
- * C is the slowest to load due to the need to split each line based upon code splitting rules.
40
- * @default "S"
41
- */
42
- type?: DictionaryFileTypes;
43
- }
44
- export interface DictionaryDefinitionPreferred extends DictionaryDefinitionBase {
45
- /** Path to the file. */
46
- path: DictionaryPath;
47
- /**
48
- * Only for legacy dictionary definitions.
49
- * @deprecated true
50
- * @deprecationMessage Use `path` instead.
51
- * @hidden
52
- */
53
- file?: undefined;
54
- }
55
- /**
56
- * Used to provide extra data related to the dictionary
57
- */
58
- export interface DictionaryDefinitionAugmented extends DictionaryDefinitionPreferred {
59
- dictionaryInformation?: DictionaryInformation;
60
- }
61
- /**
62
- * Inline Dictionary Definition
63
- *
64
- * All words are defined inline.
65
- */
66
- interface DictionaryDefinitionInlineBase extends DictionaryDefinitionBase, InlineDictionary {
67
- /**
68
- * Not used
69
- * @hidden
70
- */
71
- path?: undefined;
72
- /**
73
- * Note used
74
- * @deprecated true
75
- * @deprecationMessage Use `path` instead.
76
- * @hidden
77
- */
78
- file?: undefined;
79
- }
80
- export interface DictionaryDefinitionInlineWords extends DictionaryDefinitionInlineBase, Required<Pick<InlineDictionary, 'words'>> {
81
- words: string[];
82
- }
83
- export interface DictionaryDefinitionInlineFlagWords extends DictionaryDefinitionInlineBase, Required<Pick<InlineDictionary, 'flagWords'>> {
84
- flagWords: string[];
85
- }
86
- export interface DictionaryDefinitionInlineIgnoreWords extends DictionaryDefinitionInlineBase, Required<Pick<InlineDictionary, 'ignoreWords'>> {
87
- ignoreWords: string[];
88
- }
89
- /**
90
- * Inline Dictionary Definitions
91
- * @version 6.23.0
92
- */
93
- export type DictionaryDefinitionInline = DictionaryDefinitionInlineWords | DictionaryDefinitionInlineIgnoreWords | DictionaryDefinitionInlineFlagWords;
94
- /**
95
- * Only for legacy dictionary definitions.
96
- * @deprecated true
97
- * @deprecationMessage Use `DictionaryDefinitionPreferred` instead.
98
- */
99
- export interface DictionaryDefinitionAlternate extends DictionaryDefinitionBase {
100
- /** @hidden */
101
- path?: undefined;
102
- /**
103
- * Path to the file, only for legacy dictionary definitions.
104
- * @deprecated true
105
- * @deprecationMessage Use `path` instead.
106
- */
107
- file: DictionaryPath;
108
- /** @hidden */
109
- suggestionEditCosts?: undefined;
110
- }
111
- /**
112
- * @deprecated true
113
- * @hidden
114
- */
115
- export interface DictionaryDefinitionLegacy extends DictionaryDefinitionBase {
116
- /** Path to the file, if undefined the path to the extension dictionaries is assumed. */
117
- path?: FsDictionaryPath;
118
- /**
119
- * File name.
120
- * @deprecated true
121
- * @deprecationMessage Use `path` instead.
122
- */
123
- file: FsDictionaryPath;
124
- /**
125
- * Type of file:
126
- * S - single word per line,
127
- * W - each line can contain one or more words separated by space,
128
- * C - each line is treated like code (Camel Case is allowed).
129
- * Default is S.
130
- * C is the slowest to load due to the need to split each line based upon code splitting rules.
131
- * @default "S"
132
- */
133
- type?: DictionaryFileTypes;
134
- /**
135
- * @hidden
136
- */
137
- suggestionEditCosts?: undefined;
138
- }
139
- /**
140
- * Specifies the scope of a dictionary.
141
- */
142
- export type CustomDictionaryScope = 'user' | 'workspace' | 'folder';
143
- /**
144
- * For Defining Custom dictionaries. They are generally scoped to a
145
- * `user`, `workspace`, or `folder`.
146
- * When `addWords` is true, indicates that the spell checker can add words
147
- * to the file.
148
- * Note: only plain text files with one word per line are supported at this moment.
149
- */
150
- export interface DictionaryDefinitionCustom extends DictionaryDefinitionPreferred {
151
- /** Path to custom dictionary text file. */
152
- path: CustomDictionaryPath;
153
- /**
154
- * Defines the scope for when words will be added to the dictionary.
155
- * Scope values: `user`, `workspace`, `folder`.
156
- */
157
- scope?: CustomDictionaryScope | CustomDictionaryScope[];
158
- /**
159
- * When `true`, let's the spell checker know that words can be added to this dictionary.
160
- */
161
- addWords: boolean;
162
- }
163
- /**
164
- * This is the name of a dictionary.
165
- *
166
- * Name Format:
167
- * - Must contain at least 1 number or letter.
168
- * - Spaces are allowed.
169
- * - Leading and trailing space will be removed.
170
- * - Names ARE case-sensitive.
171
- * - Must not contain `*`, `!`, `;`, `,`, `{`, `}`, `[`, `]`, `~`.
172
- *
173
- * @pattern ^(?=[^!*,;{}[\]~\n]+$)(?=(.*\w)).+$
174
- */
175
- export type DictionaryId = string;
176
- export type ReplaceEntry = [string, string];
177
- export type ReplaceMap = ReplaceEntry[];
178
- /**
179
- * A File System Path. Relative paths are relative to the configuration file.
180
- */
181
- export type FsDictionaryPath = string;
182
- /**
183
- * A File System Path to a dictionary file.
184
- * @pattern ^.*\.(?:txt|trie)(?:\.gz)?$
185
- */
186
- export type DictionaryPath = string;
187
- /**
188
- * A File System Path to a dictionary file.
189
- */
190
- export type CustomDictionaryPath = FsDictionaryPath;
191
- /**
192
- * Reference to a dictionary by name.
193
- * One of:
194
- * - {@link DictionaryRef}
195
- * - {@link DictionaryNegRef}
196
- */
197
- export type DictionaryReference = DictionaryRef | DictionaryNegRef;
198
- /**
199
- * This a reference to a named dictionary.
200
- * It is expected to match the name of a dictionary.
201
- */
202
- export type DictionaryRef = DictionaryId;
203
- /**
204
- * This a negative reference to a named dictionary.
205
- *
206
- * It is used to exclude or include a dictionary by name.
207
- *
208
- * The reference starts with 1 or more `!`.
209
- * - `!<dictionary_name>` - Used to exclude the dictionary matching `<dictionary_name>`.
210
- * - `!!<dictionary_name>` - Used to re-include a dictionary matching `<dictionary_name>`.
211
- * Overrides `!<dictionary_name>`.
212
- * - `!!!<dictionary_name>` - Used to exclude a dictionary matching `<dictionary_name>`.
213
- * Overrides `!!<dictionary_name>`.
214
- *
215
- * @pattern ^(?=!+[^!*,;{}[\]~\n]+$)(?=(.*\w)).+$
216
- */
217
- export type DictionaryNegRef = string;
218
- export {};
219
- //# sourceMappingURL=DictionaryDefinition.d.mts.map
@@ -1,219 +0,0 @@
1
- import type { DictionaryInformation } from './DictionaryInformation.js';
2
- import type { InlineDictionary } from './InlineDictionary.js';
3
- export type DictionaryDefinition = DictionaryDefinitionPreferred | DictionaryDefinitionCustom | DictionaryDefinitionAugmented | DictionaryDefinitionInline | DictionaryDefinitionAlternate | DictionaryDefinitionLegacy;
4
- export type DictionaryFileTypes = 'S' | 'W' | 'C' | 'T';
5
- export interface DictionaryDefinitionBase {
6
- /**
7
- * This is the name of a dictionary.
8
- *
9
- * Name Format:
10
- * - Must contain at least 1 number or letter.
11
- * - Spaces are allowed.
12
- * - Leading and trailing space will be removed.
13
- * - Names ARE case-sensitive.
14
- * - Must not contain `*`, `!`, `;`, `,`, `{`, `}`, `[`, `]`, `~`.
15
- */
16
- name: DictionaryId;
17
- /** Optional description. */
18
- description?: string;
19
- /** Replacement pairs. */
20
- repMap?: ReplaceMap;
21
- /** Use Compounds. */
22
- useCompounds?: boolean;
23
- /**
24
- * Indicate that suggestions should not come from this dictionary.
25
- * Words in this dictionary are considered correct, but will not be
26
- * used when making spell correction suggestions.
27
- *
28
- * Note: if a word is suggested by another dictionary, but found in
29
- * this dictionary, it will be removed from the set of
30
- * possible suggestions.
31
- */
32
- noSuggest?: boolean;
33
- /**
34
- * Type of file:
35
- * S - single word per line,
36
- * W - each line can contain one or more words separated by space,
37
- * C - each line is treated like code (Camel Case is allowed).
38
- * Default is S.
39
- * C is the slowest to load due to the need to split each line based upon code splitting rules.
40
- * @default "S"
41
- */
42
- type?: DictionaryFileTypes;
43
- }
44
- export interface DictionaryDefinitionPreferred extends DictionaryDefinitionBase {
45
- /** Path to the file. */
46
- path: DictionaryPath;
47
- /**
48
- * Only for legacy dictionary definitions.
49
- * @deprecated true
50
- * @deprecationMessage Use `path` instead.
51
- * @hidden
52
- */
53
- file?: undefined;
54
- }
55
- /**
56
- * Used to provide extra data related to the dictionary
57
- */
58
- export interface DictionaryDefinitionAugmented extends DictionaryDefinitionPreferred {
59
- dictionaryInformation?: DictionaryInformation;
60
- }
61
- /**
62
- * Inline Dictionary Definition
63
- *
64
- * All words are defined inline.
65
- */
66
- interface DictionaryDefinitionInlineBase extends DictionaryDefinitionBase, InlineDictionary {
67
- /**
68
- * Not used
69
- * @hidden
70
- */
71
- path?: undefined;
72
- /**
73
- * Note used
74
- * @deprecated true
75
- * @deprecationMessage Use `path` instead.
76
- * @hidden
77
- */
78
- file?: undefined;
79
- }
80
- export interface DictionaryDefinitionInlineWords extends DictionaryDefinitionInlineBase, Required<Pick<InlineDictionary, 'words'>> {
81
- words: string[];
82
- }
83
- export interface DictionaryDefinitionInlineFlagWords extends DictionaryDefinitionInlineBase, Required<Pick<InlineDictionary, 'flagWords'>> {
84
- flagWords: string[];
85
- }
86
- export interface DictionaryDefinitionInlineIgnoreWords extends DictionaryDefinitionInlineBase, Required<Pick<InlineDictionary, 'ignoreWords'>> {
87
- ignoreWords: string[];
88
- }
89
- /**
90
- * Inline Dictionary Definitions
91
- * @version 6.23.0
92
- */
93
- export type DictionaryDefinitionInline = DictionaryDefinitionInlineWords | DictionaryDefinitionInlineIgnoreWords | DictionaryDefinitionInlineFlagWords;
94
- /**
95
- * Only for legacy dictionary definitions.
96
- * @deprecated true
97
- * @deprecationMessage Use `DictionaryDefinitionPreferred` instead.
98
- */
99
- export interface DictionaryDefinitionAlternate extends DictionaryDefinitionBase {
100
- /** @hidden */
101
- path?: undefined;
102
- /**
103
- * Path to the file, only for legacy dictionary definitions.
104
- * @deprecated true
105
- * @deprecationMessage Use `path` instead.
106
- */
107
- file: DictionaryPath;
108
- /** @hidden */
109
- suggestionEditCosts?: undefined;
110
- }
111
- /**
112
- * @deprecated true
113
- * @hidden
114
- */
115
- export interface DictionaryDefinitionLegacy extends DictionaryDefinitionBase {
116
- /** Path to the file, if undefined the path to the extension dictionaries is assumed. */
117
- path?: FsDictionaryPath;
118
- /**
119
- * File name.
120
- * @deprecated true
121
- * @deprecationMessage Use `path` instead.
122
- */
123
- file: FsDictionaryPath;
124
- /**
125
- * Type of file:
126
- * S - single word per line,
127
- * W - each line can contain one or more words separated by space,
128
- * C - each line is treated like code (Camel Case is allowed).
129
- * Default is S.
130
- * C is the slowest to load due to the need to split each line based upon code splitting rules.
131
- * @default "S"
132
- */
133
- type?: DictionaryFileTypes;
134
- /**
135
- * @hidden
136
- */
137
- suggestionEditCosts?: undefined;
138
- }
139
- /**
140
- * Specifies the scope of a dictionary.
141
- */
142
- export type CustomDictionaryScope = 'user' | 'workspace' | 'folder';
143
- /**
144
- * For Defining Custom dictionaries. They are generally scoped to a
145
- * `user`, `workspace`, or `folder`.
146
- * When `addWords` is true, indicates that the spell checker can add words
147
- * to the file.
148
- * Note: only plain text files with one word per line are supported at this moment.
149
- */
150
- export interface DictionaryDefinitionCustom extends DictionaryDefinitionPreferred {
151
- /** Path to custom dictionary text file. */
152
- path: CustomDictionaryPath;
153
- /**
154
- * Defines the scope for when words will be added to the dictionary.
155
- * Scope values: `user`, `workspace`, `folder`.
156
- */
157
- scope?: CustomDictionaryScope | CustomDictionaryScope[];
158
- /**
159
- * When `true`, let's the spell checker know that words can be added to this dictionary.
160
- */
161
- addWords: boolean;
162
- }
163
- /**
164
- * This is the name of a dictionary.
165
- *
166
- * Name Format:
167
- * - Must contain at least 1 number or letter.
168
- * - Spaces are allowed.
169
- * - Leading and trailing space will be removed.
170
- * - Names ARE case-sensitive.
171
- * - Must not contain `*`, `!`, `;`, `,`, `{`, `}`, `[`, `]`, `~`.
172
- *
173
- * @pattern ^(?=[^!*,;{}[\]~\n]+$)(?=(.*\w)).+$
174
- */
175
- export type DictionaryId = string;
176
- export type ReplaceEntry = [string, string];
177
- export type ReplaceMap = ReplaceEntry[];
178
- /**
179
- * A File System Path. Relative paths are relative to the configuration file.
180
- */
181
- export type FsDictionaryPath = string;
182
- /**
183
- * A File System Path to a dictionary file.
184
- * @pattern ^.*\.(?:txt|trie)(?:\.gz)?$
185
- */
186
- export type DictionaryPath = string;
187
- /**
188
- * A File System Path to a dictionary file.
189
- */
190
- export type CustomDictionaryPath = FsDictionaryPath;
191
- /**
192
- * Reference to a dictionary by name.
193
- * One of:
194
- * - {@link DictionaryRef}
195
- * - {@link DictionaryNegRef}
196
- */
197
- export type DictionaryReference = DictionaryRef | DictionaryNegRef;
198
- /**
199
- * This a reference to a named dictionary.
200
- * It is expected to match the name of a dictionary.
201
- */
202
- export type DictionaryRef = DictionaryId;
203
- /**
204
- * This a negative reference to a named dictionary.
205
- *
206
- * It is used to exclude or include a dictionary by name.
207
- *
208
- * The reference starts with 1 or more `!`.
209
- * - `!<dictionary_name>` - Used to exclude the dictionary matching `<dictionary_name>`.
210
- * - `!!<dictionary_name>` - Used to re-include a dictionary matching `<dictionary_name>`.
211
- * Overrides `!<dictionary_name>`.
212
- * - `!!!<dictionary_name>` - Used to exclude a dictionary matching `<dictionary_name>`.
213
- * Overrides `!!<dictionary_name>`.
214
- *
215
- * @pattern ^(?=!+[^!*,;{}[\]~\n]+$)(?=(.*\w)).+$
216
- */
217
- export type DictionaryNegRef = string;
218
- export {};
219
- //# sourceMappingURL=DictionaryDefinition.d.ts.map
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,210 +0,0 @@
1
- import type { SuggestionCostsDefs } from './suggestionCostsDef.mjs';
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
- *
22
- * Default: `"\u0300-\u0341"`
23
- */
24
- accents?: CharacterSet | CharacterSetCosts[];
25
- /**
26
- * Define edit costs.
27
- */
28
- costs?: EditCosts;
29
- /**
30
- * Used in making suggestions. The lower the value, the more likely the suggestion
31
- * will be near the top of the suggestion list.
32
- */
33
- suggestionEditCosts?: SuggestionCostsDefs | undefined;
34
- /**
35
- * Used by dictionary authors
36
- */
37
- hunspellInformation?: HunspellInformation;
38
- /**
39
- * A collection of patterns to test against the suggested words.
40
- * If the word matches the pattern, then the penalty is applied.
41
- */
42
- adjustments?: PatternAdjustment[];
43
- /**
44
- * An optional set of characters that can possibly be removed from a word before
45
- * checking it.
46
- *
47
- * This is useful in languages like Arabic where Harakat accents are optional.
48
- *
49
- * Note: All matching characters are removed or none. Partial removal is not supported.
50
- */
51
- ignore?: CharacterSet;
52
- }
53
- export interface HunspellInformation {
54
- /**
55
- * Selected Hunspell AFF content.
56
- * The content must be UTF-8
57
- *
58
- * Sections:
59
- * - TRY
60
- * - MAP
61
- * - REP
62
- * - KEY
63
- * - ICONV
64
- * - OCONV
65
- *
66
- * Example:
67
- * ```hunspell
68
- * # Comment
69
- * TRY aeistlunkodmrvpgjhäõbüoöfcwzxðqþ`
70
- * MAP aàâäAÀÂÄ
71
- * MAP eéèêëEÉÈÊË
72
- * MAP iîïyIÎÏY
73
- * MAP oôöOÔÖ
74
- * MAP (IJ)(IJ)
75
- * ```
76
- */
77
- aff: HunspellAffContent;
78
- /** The costs to apply when using the hunspell settings */
79
- costs?: HunspellCosts;
80
- }
81
- /**
82
- * Selected Hunspell AFF content.
83
- * The content must be UTF-8
84
- *
85
- * Sections:
86
- * - TRY
87
- * - NO-TRY
88
- * - MAP
89
- * - REP
90
- * - KEY
91
- * - ICONV
92
- * - OCONV
93
- *
94
- * Example:
95
- * ```hunspell
96
- * # Comment
97
- * TRY aeistlunkodmrvpgjhäõbüoöfcwzxðqþ`
98
- * NO-TRY -0123456789 # Discourage adding numbers and dashes.
99
- * MAP aàâäAÀÂÄ
100
- * MAP eéèêëEÉÈÊË
101
- * MAP iîïyIÎÏY
102
- * MAP oôöOÔÖ
103
- * MAP (IJ)(IJ)
104
- * ```
105
- */
106
- type HunspellAffContent = string;
107
- interface HunspellCosts extends EditCosts {
108
- /**
109
- * The cost of inserting / deleting / or swapping any `tryChars`
110
- * Defaults to `baseCosts`
111
- */
112
- tryCharCost?: number;
113
- /**
114
- * The cost of replacing or swapping any adjacent keyboard characters.
115
- *
116
- * This should be slightly cheaper than `tryCharCost`.
117
- * @default 99
118
- */
119
- keyboardCost?: number;
120
- /**
121
- * mapSet replacement cost is the cost to substitute one character with another from
122
- * the same set.
123
- *
124
- * Map characters are considered very similar to each other and are often
125
- * the cause of simple mistakes.
126
- *
127
- * @default 25
128
- */
129
- mapCost?: number;
130
- /**
131
- * The cost to convert between convert pairs.
132
- *
133
- * The value should be slightly higher than the mapCost.
134
- *
135
- * @default 30
136
- */
137
- ioConvertCost?: number;
138
- /**
139
- * The cost to substitute pairs found in the replace settings.
140
- *
141
- * @default 75
142
- */
143
- replaceCosts?: number;
144
- }
145
- /**
146
- *
147
- */
148
- export interface EditCosts {
149
- /**
150
- * This is the base cost for making an edit.
151
- * @default 100
152
- */
153
- baseCost?: number;
154
- /**
155
- * This is the cost for characters not in the alphabet.
156
- * @default 110
157
- */
158
- nonAlphabetCosts?: number;
159
- /**
160
- * The extra cost incurred for changing the first letter of a word.
161
- * This value should be less than `100 - baseCost`.
162
- * @default 4
163
- */
164
- firstLetterPenalty?: number;
165
- /**
166
- * The cost to change capitalization.
167
- * This should be very cheap, it helps with fixing capitalization issues.
168
- * @default 1
169
- */
170
- capsCosts?: number;
171
- /**
172
- * The cost to add / remove an accent
173
- * This should be very cheap, it helps with fixing accent issues.
174
- * @default 1
175
- */
176
- accentCosts?: number;
177
- }
178
- /**
179
- * This is a set of characters that can include `-` or `|`
180
- * - `-` - indicates a range of characters: `a-c` => `abc`
181
- * - `|` - is a group separator, indicating that the characters on either side
182
- * are not related.
183
- */
184
- export type CharacterSet = string;
185
- export interface CharacterSetCosts {
186
- /**
187
- * This is a set of characters that can include `-` or `|`
188
- * - `-` - indicates a range of characters: `a-c` => `abc`
189
- * - `|` - is a group separator, indicating that the characters on either side
190
- * are not related.
191
- */
192
- characters: CharacterSet;
193
- /** the cost to insert / delete / replace / swap the characters in a group */
194
- cost: number;
195
- /**
196
- * The penalty cost to apply if the accent is used.
197
- * This is used to discourage
198
- */
199
- penalty?: number;
200
- }
201
- export interface PatternAdjustment {
202
- /** Id of the Adjustment, i.e. `short-compound` */
203
- id: string;
204
- /** RegExp pattern to match */
205
- regexp: string | RegExp;
206
- /** The amount of penalty to apply. */
207
- penalty: number;
208
- }
209
- export {};
210
- //# sourceMappingURL=DictionaryInformation.d.mts.map