@cspell/cspell-types 6.1.3 → 6.2.2
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 +22 -1
- package/dist/CSpellSettingsDef.d.ts +20 -10
- package/dist/configFields.js +0 -1
- package/dist/types.d.ts +9 -0
- package/dist/types.js +5 -0
- package/package.json +3 -3
package/cspell.schema.json
CHANGED
|
@@ -1103,7 +1103,9 @@
|
|
|
1103
1103
|
{
|
|
1104
1104
|
"type": "string"
|
|
1105
1105
|
},
|
|
1106
|
-
{
|
|
1106
|
+
{
|
|
1107
|
+
"$ref": "#/definitions/Serializable"
|
|
1108
|
+
}
|
|
1107
1109
|
],
|
|
1108
1110
|
"maxItems": 2,
|
|
1109
1111
|
"minItems": 2,
|
|
@@ -1112,6 +1114,25 @@
|
|
|
1112
1114
|
],
|
|
1113
1115
|
"description": "Reporter name or reporter name + reporter config."
|
|
1114
1116
|
},
|
|
1117
|
+
"Serializable": {
|
|
1118
|
+
"anyOf": [
|
|
1119
|
+
{
|
|
1120
|
+
"type": "number"
|
|
1121
|
+
},
|
|
1122
|
+
{
|
|
1123
|
+
"type": "string"
|
|
1124
|
+
},
|
|
1125
|
+
{
|
|
1126
|
+
"type": "boolean"
|
|
1127
|
+
},
|
|
1128
|
+
{
|
|
1129
|
+
"type": "null"
|
|
1130
|
+
},
|
|
1131
|
+
{
|
|
1132
|
+
"type": "object"
|
|
1133
|
+
}
|
|
1134
|
+
]
|
|
1135
|
+
},
|
|
1115
1136
|
"SimpleGlob": {
|
|
1116
1137
|
"description": "Simple Glob string, the root will be globRoot.",
|
|
1117
1138
|
"type": "string"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DictionaryInformation } from './DictionaryInformation';
|
|
2
2
|
import type { Features } from './features';
|
|
3
3
|
import { Parser, ParserName } from './Parser';
|
|
4
|
+
import { Serializable } from './types';
|
|
4
5
|
export declare type ReplaceEntry = [string, string];
|
|
5
6
|
export declare type ReplaceMap = ReplaceEntry[];
|
|
6
7
|
/**
|
|
@@ -9,11 +10,6 @@ export declare type ReplaceMap = ReplaceEntry[];
|
|
|
9
10
|
export declare type CSpellPackageSettings = CSpellUserSettings;
|
|
10
11
|
export declare type CSpellUserSettings = CSpellSettings;
|
|
11
12
|
export interface CSpellSettings extends FileSettings, LegacySettings {
|
|
12
|
-
/**
|
|
13
|
-
* Url to JSON Schema
|
|
14
|
-
* @default "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json"
|
|
15
|
-
*/
|
|
16
|
-
$schema?: string;
|
|
17
13
|
}
|
|
18
14
|
export interface ImportFileRef {
|
|
19
15
|
filename: string;
|
|
@@ -25,7 +21,14 @@ export interface CSpellSettingsWithSourceTrace extends CSpellSettings {
|
|
|
25
21
|
__importRef?: ImportFileRef;
|
|
26
22
|
__imports?: Map<string, ImportFileRef>;
|
|
27
23
|
}
|
|
28
|
-
export interface
|
|
24
|
+
export interface AdvancedCSpellSettingsWithSourceTrace extends CSpellSettingsWithSourceTrace, ExperimentalFileSettings {
|
|
25
|
+
}
|
|
26
|
+
export interface FileSettings extends ExtendableSettings, CommandLineSettings {
|
|
27
|
+
/**
|
|
28
|
+
* Url to JSON Schema
|
|
29
|
+
* @default "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json"
|
|
30
|
+
*/
|
|
31
|
+
$schema?: string;
|
|
29
32
|
/**
|
|
30
33
|
* Configuration format version of the settings file.
|
|
31
34
|
*
|
|
@@ -802,7 +805,7 @@ interface BaseSource {
|
|
|
802
805
|
/**
|
|
803
806
|
* Reporter name or reporter name + reporter config.
|
|
804
807
|
*/
|
|
805
|
-
export declare type ReporterSettings = string | [string] | [string,
|
|
808
|
+
export declare type ReporterSettings = string | [string] | [string, Serializable];
|
|
806
809
|
/**
|
|
807
810
|
* Experimental Configuration / Options
|
|
808
811
|
*
|
|
@@ -816,7 +819,14 @@ export interface ExperimentalFileSettings {
|
|
|
816
819
|
* @experimental
|
|
817
820
|
* @version 6.2.0
|
|
818
821
|
*/
|
|
819
|
-
plugins?: Plugin[]
|
|
822
|
+
plugins?: Plugin[];
|
|
823
|
+
}
|
|
824
|
+
/**
|
|
825
|
+
* Extends CSpellSettings with ExperimentalFileSettings
|
|
826
|
+
* @experimental
|
|
827
|
+
* @hidden
|
|
828
|
+
*/
|
|
829
|
+
export interface AdvancedCSpellSettings extends CSpellSettings, ExperimentalFileSettings {
|
|
820
830
|
}
|
|
821
831
|
/**
|
|
822
832
|
* Experimental Configuration / Options
|
|
@@ -831,7 +841,7 @@ export interface ExperimentalBaseSettings {
|
|
|
831
841
|
* @experimental
|
|
832
842
|
* @version 6.2.0
|
|
833
843
|
*/
|
|
834
|
-
parser?: ParserName
|
|
844
|
+
parser?: ParserName;
|
|
835
845
|
}
|
|
836
846
|
/**
|
|
837
847
|
* Plugin API
|
|
@@ -839,7 +849,7 @@ export interface ExperimentalBaseSettings {
|
|
|
839
849
|
* @version 6.2.0
|
|
840
850
|
*/
|
|
841
851
|
export interface Plugin {
|
|
842
|
-
parsers?: Parser[]
|
|
852
|
+
parsers?: Parser[];
|
|
843
853
|
}
|
|
844
854
|
export {};
|
|
845
855
|
//# sourceMappingURL=CSpellSettingsDef.d.ts.map
|
package/dist/configFields.js
CHANGED
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare type Serialize<T> = T extends Function ? never : T extends null ? null : T extends any[] ? SerializeArray<T> : T extends object ? SerializeObj<T> : Primitives<T>;
|
|
2
|
+
declare type SerializeObj<T extends object> = {
|
|
3
|
+
[K in keyof T]: K extends string | number ? Serialize<T[K]> : never;
|
|
4
|
+
};
|
|
5
|
+
declare type SerializeArray<T extends Array<any>> = T extends [infer R] ? [Serialize<R>] : T extends [infer R0, infer R1] ? [Serialize<R0>, Serialize<R1>] : T extends [infer R0, infer R1, infer R2] ? [Serialize<R0>, Serialize<R1>, Serialize<R2>] : T extends Array<infer R> ? Serialize<R>[] : never;
|
|
6
|
+
declare type Primitives<T> = Extract<T, number | string | null | boolean>;
|
|
7
|
+
export declare type Serializable = number | string | boolean | null | object;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.js
ADDED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "6.
|
|
6
|
+
"version": "6.2.2",
|
|
7
7
|
"description": "Types for cspell and cspell-lib",
|
|
8
8
|
"type": "commonjs",
|
|
9
9
|
"main": "dist/index.js",
|
|
@@ -64,10 +64,10 @@
|
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"ajv-cli": "^5.0.0",
|
|
67
|
-
"jest": "^28.1.
|
|
67
|
+
"jest": "^28.1.2",
|
|
68
68
|
"rimraf": "^3.0.2",
|
|
69
69
|
"ts-json-schema-generator": "^1.0.0",
|
|
70
70
|
"typescript": "^4.7.4"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "b7716e80c39a780f98cde747ad66c55247636621"
|
|
73
73
|
}
|