@cspell/cspell-types 5.18.1 → 5.18.5
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/cspell.schema.json +33 -2
- package/dist/CSpellReporter.d.ts +14 -6
- package/dist/CSpellSettingsDef.d.ts +4 -0
- package/dist/DictionaryInformation.d.ts +14 -99
- package/package.json +4 -4
package/cspell.schema.json
CHANGED
|
@@ -403,8 +403,14 @@
|
|
|
403
403
|
"type": "array"
|
|
404
404
|
}
|
|
405
405
|
],
|
|
406
|
-
"
|
|
407
|
-
|
|
406
|
+
"description": "The accent characters.\n\nDefault: `\"\\u0300-\\u0341\"`"
|
|
407
|
+
},
|
|
408
|
+
"adjustments": {
|
|
409
|
+
"description": "A collection of patterns to test against the suggested words. If the word matches the pattern, then the penalty is applied.",
|
|
410
|
+
"items": {
|
|
411
|
+
"$ref": "#/definitions/PatternAdjustment"
|
|
412
|
+
},
|
|
413
|
+
"type": "array"
|
|
408
414
|
},
|
|
409
415
|
"alphabet": {
|
|
410
416
|
"anyOf": [
|
|
@@ -948,6 +954,29 @@
|
|
|
948
954
|
"Pattern": {
|
|
949
955
|
"type": "string"
|
|
950
956
|
},
|
|
957
|
+
"PatternAdjustment": {
|
|
958
|
+
"additionalProperties": false,
|
|
959
|
+
"properties": {
|
|
960
|
+
"id": {
|
|
961
|
+
"description": "Id of the Adjustment, i.e. `short-compound`",
|
|
962
|
+
"type": "string"
|
|
963
|
+
},
|
|
964
|
+
"penalty": {
|
|
965
|
+
"description": "The amount of penalty to apply.",
|
|
966
|
+
"type": "number"
|
|
967
|
+
},
|
|
968
|
+
"regexp": {
|
|
969
|
+
"description": "RegExp pattern to match",
|
|
970
|
+
"type": "string"
|
|
971
|
+
}
|
|
972
|
+
},
|
|
973
|
+
"required": [
|
|
974
|
+
"id",
|
|
975
|
+
"regexp",
|
|
976
|
+
"penalty"
|
|
977
|
+
],
|
|
978
|
+
"type": "object"
|
|
979
|
+
},
|
|
951
980
|
"PatternId": {
|
|
952
981
|
"description": "This matches the name in a pattern definition.",
|
|
953
982
|
"type": "string"
|
|
@@ -1128,6 +1157,8 @@
|
|
|
1128
1157
|
},
|
|
1129
1158
|
"properties": {
|
|
1130
1159
|
"$schema": {
|
|
1160
|
+
"default": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
|
|
1161
|
+
"description": "Url to JSON Schema",
|
|
1131
1162
|
"type": "string"
|
|
1132
1163
|
},
|
|
1133
1164
|
"allowCompoundWords": {
|
package/dist/CSpellReporter.d.ts
CHANGED
|
@@ -19,21 +19,30 @@ export declare type ErrorLike = Error | {
|
|
|
19
19
|
};
|
|
20
20
|
export declare type ErrorEmitter = (message: string, error: ErrorLike) => void;
|
|
21
21
|
export declare type SpellingErrorEmitter = (issue: Issue) => void;
|
|
22
|
-
export declare type ProgressTypes = 'ProgressFileComplete';
|
|
23
|
-
export declare type ProgressItem = ProgressFileComplete;
|
|
24
|
-
interface ProgressBase {
|
|
22
|
+
export declare type ProgressTypes = 'ProgressFileBegin' | 'ProgressFileComplete';
|
|
23
|
+
export declare type ProgressItem = ProgressFileBegin | ProgressFileComplete;
|
|
24
|
+
export interface ProgressBase {
|
|
25
25
|
type: ProgressTypes;
|
|
26
26
|
}
|
|
27
|
-
export interface
|
|
28
|
-
type:
|
|
27
|
+
export interface ProgressFileBase extends ProgressBase {
|
|
28
|
+
type: ProgressTypes;
|
|
29
29
|
fileNum: number;
|
|
30
30
|
fileCount: number;
|
|
31
31
|
filename: string;
|
|
32
|
+
}
|
|
33
|
+
export interface ProgressFileComplete extends ProgressFileBase {
|
|
34
|
+
type: 'ProgressFileComplete';
|
|
32
35
|
elapsedTimeMs: number | undefined;
|
|
33
36
|
processed: boolean | undefined;
|
|
34
37
|
numErrors: number | undefined;
|
|
35
38
|
cached?: boolean;
|
|
36
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Notification sent just before processing a file.
|
|
42
|
+
*/
|
|
43
|
+
export interface ProgressFileBegin extends ProgressFileBase {
|
|
44
|
+
type: 'ProgressFileBegin';
|
|
45
|
+
}
|
|
37
46
|
export declare type ProgressEmitter = (p: ProgressItem | ProgressFileComplete) => void;
|
|
38
47
|
export interface RunResult {
|
|
39
48
|
/** Number of files processed. */
|
|
@@ -59,5 +68,4 @@ export interface CSpellReporter {
|
|
|
59
68
|
export interface CSpellReporterModule {
|
|
60
69
|
getReporter: (settings: unknown) => CSpellReporter;
|
|
61
70
|
}
|
|
62
|
-
export {};
|
|
63
71
|
//# sourceMappingURL=CSpellReporter.d.ts.map
|
|
@@ -8,6 +8,10 @@ export declare type ReplaceMap = ReplaceEntry[];
|
|
|
8
8
|
export declare type CSpellPackageSettings = CSpellUserSettings;
|
|
9
9
|
export declare type CSpellUserSettings = CSpellSettings;
|
|
10
10
|
export interface CSpellSettings extends FileSettings, LegacySettings {
|
|
11
|
+
/**
|
|
12
|
+
* Url to JSON Schema
|
|
13
|
+
* @default "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json"
|
|
14
|
+
*/
|
|
11
15
|
$schema?: string;
|
|
12
16
|
}
|
|
13
17
|
export interface ImportFileRef {
|
|
@@ -17,8 +17,9 @@ export interface DictionaryInformation {
|
|
|
17
17
|
*/
|
|
18
18
|
alphabet?: CharacterSet | CharacterSetCosts[];
|
|
19
19
|
/**
|
|
20
|
-
* The accent characters
|
|
21
|
-
*
|
|
20
|
+
* The accent characters.
|
|
21
|
+
*
|
|
22
|
+
* Default: `"\u0300-\u0341"`
|
|
22
23
|
*/
|
|
23
24
|
accents?: CharacterSet | CharacterSetCosts[];
|
|
24
25
|
/**
|
|
@@ -34,105 +35,11 @@ export interface DictionaryInformation {
|
|
|
34
35
|
* Used by dictionary authors
|
|
35
36
|
*/
|
|
36
37
|
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
38
|
/**
|
|
97
|
-
*
|
|
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 -->
|
|
39
|
+
* A collection of patterns to test against the suggested words.
|
|
40
|
+
* If the word matches the pattern, then the penalty is applied.
|
|
132
41
|
*/
|
|
133
|
-
|
|
134
|
-
/** The costs to apply when using the hunspell settings */
|
|
135
|
-
costs?: HunspellCosts;
|
|
42
|
+
adjustments?: PatternAdjustment[];
|
|
136
43
|
}
|
|
137
44
|
export interface HunspellInformation {
|
|
138
45
|
/**
|
|
@@ -282,5 +189,13 @@ export interface CharacterSetCosts {
|
|
|
282
189
|
*/
|
|
283
190
|
penalty?: number;
|
|
284
191
|
}
|
|
192
|
+
export interface PatternAdjustment {
|
|
193
|
+
/** Id of the Adjustment, i.e. `short-compound` */
|
|
194
|
+
id: string;
|
|
195
|
+
/** RegExp pattern to match */
|
|
196
|
+
regexp: string | RegExp;
|
|
197
|
+
/** The amount of penalty to apply. */
|
|
198
|
+
penalty: number;
|
|
199
|
+
}
|
|
285
200
|
export {};
|
|
286
201
|
//# sourceMappingURL=DictionaryInformation.d.ts.map
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "5.18.
|
|
6
|
+
"version": "5.18.5",
|
|
7
7
|
"description": "Types for cspell and cspell-lib",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"typings": "dist/index.d.ts",
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"ajv-cli": "^5.0.0",
|
|
53
|
-
"jest": "^27.
|
|
53
|
+
"jest": "^27.5.1",
|
|
54
54
|
"rimraf": "^3.0.2",
|
|
55
55
|
"ts-json-schema-generator": "^0.97.0",
|
|
56
56
|
"typedoc": "0.22.11",
|
|
57
|
-
"typedoc-plugin-markdown": "^3.11.
|
|
57
|
+
"typedoc-plugin-markdown": "^3.11.14",
|
|
58
58
|
"typescript": "^4.5.5"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "bff6b01340bde5ca7a89860868e179592eaa7520"
|
|
61
61
|
}
|