oxlint 1.72.0 → 1.74.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.
- package/configuration_schema.json +272 -24
- package/dist/bindings.js +26 -26
- package/dist/index.d.ts +105 -9
- package/dist/lint.js +32 -32
- package/dist/plugins-dev.d.ts +61 -104
- package/dist/plugins-dev.js +1 -1
- package/package.json +21 -21
package/dist/lint.js
CHANGED
|
@@ -4776,7 +4776,7 @@ function deserializeBoxObjectAssignmentTarget(pos) {
|
|
|
4776
4776
|
return deserializeObjectAssignmentTarget(int32[pos >> 2]);
|
|
4777
4777
|
}
|
|
4778
4778
|
function deserializeOptionAssignmentTargetMaybeDefault(pos) {
|
|
4779
|
-
return uint8[pos] ===
|
|
4779
|
+
return uint8[pos] === 255 ? null : deserializeAssignmentTargetMaybeDefault(pos);
|
|
4780
4780
|
}
|
|
4781
4781
|
function deserializeVecOptionAssignmentTargetMaybeDefault(pos) {
|
|
4782
4782
|
let arr = [], pos32 = pos >> 2;
|
|
@@ -4808,7 +4808,7 @@ function deserializeBoxAssignmentTargetPropertyProperty(pos) {
|
|
|
4808
4808
|
return deserializeAssignmentTargetPropertyProperty(int32[pos >> 2]);
|
|
4809
4809
|
}
|
|
4810
4810
|
function deserializeOptionExpression(pos) {
|
|
4811
|
-
return uint8[pos] ===
|
|
4811
|
+
return uint8[pos] === 255 ? null : deserializeExpression(pos);
|
|
4812
4812
|
}
|
|
4813
4813
|
function deserializeBoxBlockStatement(pos) {
|
|
4814
4814
|
return deserializeBlockStatement(int32[pos >> 2]);
|
|
@@ -4899,10 +4899,10 @@ function deserializeOptionBoxTSTypeAnnotation(pos) {
|
|
|
4899
4899
|
return int32[pos >> 2] === 0 && int32[(pos >> 2) + 1] === 0 ? null : deserializeBoxTSTypeAnnotation(pos);
|
|
4900
4900
|
}
|
|
4901
4901
|
function deserializeOptionStatement(pos) {
|
|
4902
|
-
return uint8[pos] ===
|
|
4902
|
+
return uint8[pos] === 255 ? null : deserializeStatement(pos);
|
|
4903
4903
|
}
|
|
4904
4904
|
function deserializeOptionForStatementInit(pos) {
|
|
4905
|
-
return uint8[pos] ===
|
|
4905
|
+
return uint8[pos] === 255 ? null : deserializeForStatementInit(pos);
|
|
4906
4906
|
}
|
|
4907
4907
|
function deserializeOptionLabelIdentifier(pos) {
|
|
4908
4908
|
return int32[(pos >> 2) + 4] === 0 && int32[(pos >> 2) + 5] === 0 ? null : deserializeLabelIdentifier(pos);
|
|
@@ -4924,7 +4924,7 @@ function deserializeOptionBoxBlockStatement(pos) {
|
|
|
4924
4924
|
return int32[pos >> 2] === 0 && int32[(pos >> 2) + 1] === 0 ? null : deserializeBoxBlockStatement(pos);
|
|
4925
4925
|
}
|
|
4926
4926
|
function deserializeOptionCatchParameter(pos) {
|
|
4927
|
-
return uint8[pos + 16] ===
|
|
4927
|
+
return uint8[pos + 16] === 255 ? null : deserializeCatchParameter(pos);
|
|
4928
4928
|
}
|
|
4929
4929
|
function deserializeBoxBindingIdentifier(pos) {
|
|
4930
4930
|
return deserializeBindingIdentifier(int32[pos >> 2]);
|
|
@@ -4952,7 +4952,7 @@ function deserializeOptionBoxBindingRestElement(pos) {
|
|
|
4952
4952
|
return int32[pos >> 2] === 0 && int32[(pos >> 2) + 1] === 0 ? null : deserializeBoxBindingRestElement(pos);
|
|
4953
4953
|
}
|
|
4954
4954
|
function deserializeOptionBindingPattern(pos) {
|
|
4955
|
-
return uint8[pos] ===
|
|
4955
|
+
return uint8[pos] === 255 ? null : deserializeBindingPattern(pos);
|
|
4956
4956
|
}
|
|
4957
4957
|
function deserializeVecOptionBindingPattern(pos) {
|
|
4958
4958
|
let arr = [], pos32 = pos >> 2;
|
|
@@ -5006,7 +5006,7 @@ function deserializeOptionBoxExpression(pos) {
|
|
|
5006
5006
|
return int32[pos >> 2] === 0 && int32[(pos >> 2) + 1] === 0 ? null : deserializeBoxExpression(pos);
|
|
5007
5007
|
}
|
|
5008
5008
|
function deserializeOptionTSAccessibility(pos) {
|
|
5009
|
-
return uint8[pos] ===
|
|
5009
|
+
return uint8[pos] === 255 ? null : deserializeTSAccessibility(pos);
|
|
5010
5010
|
}
|
|
5011
5011
|
function deserializeVecTSClassImplements(pos) {
|
|
5012
5012
|
let arr = [], pos32 = pos >> 2;
|
|
@@ -5107,7 +5107,7 @@ function deserializeOptionStringLiteral(pos) {
|
|
|
5107
5107
|
return uint8[pos + 12] === 2 ? null : deserializeStringLiteral(pos);
|
|
5108
5108
|
}
|
|
5109
5109
|
function deserializeOptionModuleExportName(pos) {
|
|
5110
|
-
return uint8[pos] ===
|
|
5110
|
+
return uint8[pos] === 255 ? null : deserializeModuleExportName(pos);
|
|
5111
5111
|
}
|
|
5112
5112
|
function deserializeF64(pos) {
|
|
5113
5113
|
return float64[pos >> 3];
|
|
@@ -5157,7 +5157,7 @@ function deserializeBoxJSXSpreadAttribute(pos) {
|
|
|
5157
5157
|
return deserializeJSXSpreadAttribute(int32[pos >> 2]);
|
|
5158
5158
|
}
|
|
5159
5159
|
function deserializeOptionJSXAttributeValue(pos) {
|
|
5160
|
-
return uint8[pos] ===
|
|
5160
|
+
return uint8[pos] === 255 ? null : deserializeJSXAttributeValue(pos);
|
|
5161
5161
|
}
|
|
5162
5162
|
function deserializeBoxJSXExpressionContainer(pos) {
|
|
5163
5163
|
return deserializeJSXExpressionContainer(int32[pos >> 2]);
|
|
@@ -5310,7 +5310,7 @@ function deserializeBoxTSQualifiedName(pos) {
|
|
|
5310
5310
|
return deserializeTSQualifiedName(int32[pos >> 2]);
|
|
5311
5311
|
}
|
|
5312
5312
|
function deserializeOptionTSType(pos) {
|
|
5313
|
-
return uint8[pos] ===
|
|
5313
|
+
return uint8[pos] === 255 ? null : deserializeTSType(pos);
|
|
5314
5314
|
}
|
|
5315
5315
|
function deserializeVecTSTypeParameter(pos) {
|
|
5316
5316
|
let arr = [], pos32 = pos >> 2;
|
|
@@ -5374,7 +5374,7 @@ function deserializeBoxTSImportTypeQualifiedName(pos) {
|
|
|
5374
5374
|
return deserializeTSImportTypeQualifiedName(int32[pos >> 2]);
|
|
5375
5375
|
}
|
|
5376
5376
|
function deserializeOptionTSMappedTypeModifierOperator(pos) {
|
|
5377
|
-
return uint8[pos] ===
|
|
5377
|
+
return uint8[pos] === 255 ? null : deserializeTSMappedTypeModifierOperator(pos);
|
|
5378
5378
|
}
|
|
5379
5379
|
function deserializeBoxTSExternalModuleReference(pos) {
|
|
5380
5380
|
return deserializeTSExternalModuleReference(int32[pos >> 2]);
|
|
@@ -10768,14 +10768,14 @@ var require_eslint_visitor_keys = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10768
10768
|
* @public
|
|
10769
10769
|
*/
|
|
10770
10770
|
get isTypeVariable() {
|
|
10771
|
-
return this.defs.length === 0
|
|
10771
|
+
return this.defs.length === 0 || this.defs.some((def) => def.isTypeDefinition);
|
|
10772
10772
|
}
|
|
10773
10773
|
/**
|
|
10774
10774
|
* `true` if the variable is valid in a value context, false otherwise
|
|
10775
10775
|
* @public
|
|
10776
10776
|
*/
|
|
10777
10777
|
get isValueVariable() {
|
|
10778
|
-
return this.defs.length === 0
|
|
10778
|
+
return this.defs.length === 0 || this.defs.some((def) => def.isVariableDefinition);
|
|
10779
10779
|
}
|
|
10780
10780
|
};
|
|
10781
10781
|
exports.Variable = Variable;
|
|
@@ -11036,6 +11036,15 @@ var require_eslint_visitor_keys = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11036
11036
|
}
|
|
11037
11037
|
};
|
|
11038
11038
|
exports.ClassScope = ClassScope;
|
|
11039
|
+
})), require_ClassStaticBlockScope = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11040
|
+
Object.defineProperty(exports, "__esModule", { value: !0 }), exports.ClassStaticBlockScope = void 0;
|
|
11041
|
+
let ScopeBase_1 = require_ScopeBase(), ScopeType_1 = require_ScopeType();
|
|
11042
|
+
var ClassStaticBlockScope = class extends ScopeBase_1.ScopeBase {
|
|
11043
|
+
constructor(scopeManager, upperScope, block) {
|
|
11044
|
+
super(scopeManager, ScopeType_1.ScopeType.classStaticBlock, upperScope, block, !1);
|
|
11045
|
+
}
|
|
11046
|
+
};
|
|
11047
|
+
exports.ClassStaticBlockScope = ClassStaticBlockScope;
|
|
11039
11048
|
})), require_ConditionalTypeScope = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11040
11049
|
Object.defineProperty(exports, "__esModule", { value: !0 }), exports.ConditionalTypeScope = void 0;
|
|
11041
11050
|
let ScopeBase_1 = require_ScopeBase(), ScopeType_1 = require_ScopeType();
|
|
@@ -11204,7 +11213,7 @@ var require_eslint_visitor_keys = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11204
11213
|
})), __exportStar = exports && exports.__exportStar || function(m, exports$3) {
|
|
11205
11214
|
for (var p in m) p !== "default" && !Object.prototype.hasOwnProperty.call(exports$3, p) && __createBinding(exports$3, m, p);
|
|
11206
11215
|
};
|
|
11207
|
-
Object.defineProperty(exports, "__esModule", { value: !0 }), __exportStar(require_BlockScope(), exports), __exportStar(require_CatchScope(), exports), __exportStar(require_ClassFieldInitializerScope(), exports), __exportStar(require_ClassScope(), exports), __exportStar(require_ConditionalTypeScope(), exports), __exportStar(require_ForScope(), exports), __exportStar(require_FunctionExpressionNameScope(), exports), __exportStar(require_FunctionScope(), exports), __exportStar(require_FunctionTypeScope(), exports), __exportStar(require_GlobalScope(), exports), __exportStar(require_MappedTypeScope(), exports), __exportStar(require_ModuleScope(), exports), __exportStar(require_Scope(), exports), __exportStar(require_ScopeType(), exports), __exportStar(require_SwitchScope(), exports), __exportStar(require_TSEnumScope(), exports), __exportStar(require_TSModuleScope(), exports), __exportStar(require_TypeScope(), exports), __exportStar(require_WithScope(), exports);
|
|
11216
|
+
Object.defineProperty(exports, "__esModule", { value: !0 }), __exportStar(require_BlockScope(), exports), __exportStar(require_CatchScope(), exports), __exportStar(require_ClassFieldInitializerScope(), exports), __exportStar(require_ClassScope(), exports), __exportStar(require_ClassStaticBlockScope(), exports), __exportStar(require_ConditionalTypeScope(), exports), __exportStar(require_ForScope(), exports), __exportStar(require_FunctionExpressionNameScope(), exports), __exportStar(require_FunctionScope(), exports), __exportStar(require_FunctionTypeScope(), exports), __exportStar(require_GlobalScope(), exports), __exportStar(require_MappedTypeScope(), exports), __exportStar(require_ModuleScope(), exports), __exportStar(require_Scope(), exports), __exportStar(require_ScopeType(), exports), __exportStar(require_SwitchScope(), exports), __exportStar(require_TSEnumScope(), exports), __exportStar(require_TSModuleScope(), exports), __exportStar(require_TypeScope(), exports), __exportStar(require_WithScope(), exports);
|
|
11208
11217
|
})), require_VisitorBase = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11209
11218
|
Object.defineProperty(exports, "__esModule", { value: !0 }), exports.VisitorBase = void 0;
|
|
11210
11219
|
let visitor_keys_1 = require_dist$2();
|
|
@@ -11877,15 +11886,6 @@ var require_eslint_visitor_keys = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11877
11886
|
return Referencer_1.Referencer;
|
|
11878
11887
|
}
|
|
11879
11888
|
});
|
|
11880
|
-
})), require_ClassStaticBlockScope = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11881
|
-
Object.defineProperty(exports, "__esModule", { value: !0 }), exports.ClassStaticBlockScope = void 0;
|
|
11882
|
-
let ScopeBase_1 = require_ScopeBase(), ScopeType_1 = require_ScopeType();
|
|
11883
|
-
var ClassStaticBlockScope = class extends ScopeBase_1.ScopeBase {
|
|
11884
|
-
constructor(scopeManager, upperScope, block) {
|
|
11885
|
-
super(scopeManager, ScopeType_1.ScopeType.classStaticBlock, upperScope, block, !1);
|
|
11886
|
-
}
|
|
11887
|
-
};
|
|
11888
|
-
exports.ClassStaticBlockScope = ClassStaticBlockScope;
|
|
11889
11889
|
})), require_ScopeManager = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11890
11890
|
Object.defineProperty(exports, "__esModule", { value: !0 }), exports.ScopeManager = void 0;
|
|
11891
11891
|
let assert_1 = require_assert$1(), scope_1 = require_scope(), ClassFieldInitializerScope_1 = require_ClassFieldInitializerScope(), ClassStaticBlockScope_1 = require_ClassStaticBlockScope();
|
|
@@ -14109,7 +14109,7 @@ function resetSettings() {
|
|
|
14109
14109
|
}
|
|
14110
14110
|
//#endregion
|
|
14111
14111
|
//#region package.json
|
|
14112
|
-
var version = "1.
|
|
14112
|
+
var version = "1.74.0";
|
|
14113
14113
|
//#endregion
|
|
14114
14114
|
//#region src-js/plugins/context.ts
|
|
14115
14115
|
const ObjectFreeze$1 = Object.freeze, ObjectCreate = Object.create, ObjectAssign = Object.assign, ObjectPreventExtensions = Object.preventExtensions;
|
|
@@ -15369,7 +15369,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15369
15369
|
})), require_fast_json_stable_stringify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
15370
15370
|
module.exports = function(data, opts) {
|
|
15371
15371
|
opts ||= {}, typeof opts == "function" && (opts = { cmp: opts });
|
|
15372
|
-
var cycles = typeof opts.cycles == "boolean"
|
|
15372
|
+
var cycles = typeof opts.cycles == "boolean" && opts.cycles, cmp = opts.cmp && (function(f) {
|
|
15373
15373
|
return function(node) {
|
|
15374
15374
|
return function(a, b) {
|
|
15375
15375
|
return f({
|
|
@@ -16126,7 +16126,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16126
16126
|
var $opExpr = "'" + $opStr + "'";
|
|
16127
16127
|
out += " if ( ", $isData && (out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "), out += " ( " + $schemaValue + " === undefined || " + $schemaExcl + " " + $op + "= " + $schemaValue + " ? " + $data + " " + $notOp + "= " + $schemaExcl + " : " + $data + " " + $notOp + " " + $schemaValue + " ) || " + $data + " !== " + $data + ") { ";
|
|
16128
16128
|
} else {
|
|
16129
|
-
$exclIsNumber && $schema === void 0 ? ($exclusive = !0, $errorKeyword = $exclusiveKeyword, $errSchemaPath = it.errSchemaPath + "/" + $exclusiveKeyword, $schemaValue = $schemaExcl, $notOp += "=") : ($exclIsNumber && ($schemaValue = Math[$isMax ? "min" : "max"]($schemaExcl, $schema)), $schemaExcl === (
|
|
16129
|
+
$exclIsNumber && $schema === void 0 ? ($exclusive = !0, $errorKeyword = $exclusiveKeyword, $errSchemaPath = it.errSchemaPath + "/" + $exclusiveKeyword, $schemaValue = $schemaExcl, $notOp += "=") : ($exclIsNumber && ($schemaValue = Math[$isMax ? "min" : "max"]($schemaExcl, $schema)), $schemaExcl === (!$exclIsNumber || $schemaValue) ? ($exclusive = !0, $errorKeyword = $exclusiveKeyword, $errSchemaPath = it.errSchemaPath + "/" + $exclusiveKeyword, $notOp += "=") : ($exclusive = !1, $opStr += "="));
|
|
16130
16130
|
var $opExpr = "'" + $opStr + "'";
|
|
16131
16131
|
out += " if ( ", $isData && (out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "), out += " " + $data + " " + $notOp + " " + $schemaValue + " || " + $data + " !== " + $data + ") { ";
|
|
16132
16132
|
}
|
|
@@ -17243,8 +17243,8 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
17243
17243
|
}
|
|
17244
17244
|
}
|
|
17245
17245
|
function noop() {}
|
|
17246
|
-
})))(), 1),
|
|
17247
|
-
id,
|
|
17246
|
+
})))(), 1), json_schema_draft_04_default = {
|
|
17247
|
+
id: "http://json-schema.org/draft-04/schema#",
|
|
17248
17248
|
$schema: "http://json-schema.org/draft-04/schema#",
|
|
17249
17249
|
description: "Core schema meta-schema",
|
|
17250
17250
|
definitions: {
|
|
@@ -17391,7 +17391,7 @@ const AJV = new import_ajv.default({
|
|
|
17391
17391
|
verbose: !0,
|
|
17392
17392
|
schemaId: "auto"
|
|
17393
17393
|
});
|
|
17394
|
-
AJV.addMetaSchema(json_schema_draft_04_default), AJV._opts.defaultMeta = id;
|
|
17394
|
+
AJV.addMetaSchema(json_schema_draft_04_default), AJV._opts.defaultMeta = json_schema_draft_04_default.id;
|
|
17395
17395
|
/**
|
|
17396
17396
|
* Compile a rule's schema into a validator function.
|
|
17397
17397
|
*
|
|
@@ -17557,8 +17557,8 @@ const neverRunBeforeHook = () => !1;
|
|
|
17557
17557
|
*/
|
|
17558
17558
|
async function loadPlugin(url, pluginName, pluginNameIsAlias, workspaceUri) {
|
|
17559
17559
|
try {
|
|
17560
|
-
let plugin = (await import(url)).default;
|
|
17561
|
-
return JSONStringify$1({ Success:
|
|
17560
|
+
let plugin = (await import(url)).default, res = registerPlugin(plugin, pluginName, pluginNameIsAlias, workspaceUri);
|
|
17561
|
+
return JSONStringify$1({ Success: res });
|
|
17562
17562
|
} catch (err) {
|
|
17563
17563
|
return JSONStringify$1({ Failure: getErrorMessage(err) });
|
|
17564
17564
|
}
|
|
@@ -17732,7 +17732,7 @@ function conformHookFn(hookFn, hookName) {
|
|
|
17732
17732
|
return hookFn;
|
|
17733
17733
|
}
|
|
17734
17734
|
//#endregion
|
|
17735
|
-
//#region ../../node_modules/.pnpm/eslint@10.
|
|
17735
|
+
//#region ../../node_modules/.pnpm/eslint@10.6.0/node_modules/eslint/lib/shared/assert.js
|
|
17736
17736
|
/**
|
|
17737
17737
|
* @fileoverview Assertion utilities equivalent to the Node.js node:asserts module.
|
|
17738
17738
|
* @author Josh Goldberg
|
package/dist/plugins-dev.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
1
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/is-any.d.ts
|
|
2
2
|
/**
|
|
3
3
|
Returns a boolean for whether the given type is `any`.
|
|
4
4
|
|
|
@@ -29,7 +29,7 @@ const anyA = get(anyObject, 'a');
|
|
|
29
29
|
*/
|
|
30
30
|
type IsAny<T> = 0 extends 1 & NoInfer<T> ? true : false;
|
|
31
31
|
//#endregion
|
|
32
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
32
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/is-optional-key-of.d.ts
|
|
33
33
|
/**
|
|
34
34
|
Returns a boolean for whether the given key is an optional key of type.
|
|
35
35
|
|
|
@@ -72,7 +72,7 @@ type T5 = IsOptionalKeyOf<User | Admin, 'surname'>;
|
|
|
72
72
|
*/
|
|
73
73
|
type IsOptionalKeyOf<Type extends object, Key extends keyof Type> = IsAny<Type | Key> extends true ? never : Key extends keyof Type ? Type extends Record<Key, Type[Key]> ? false : true : false;
|
|
74
74
|
//#endregion
|
|
75
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
75
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/optional-keys-of.d.ts
|
|
76
76
|
/**
|
|
77
77
|
Extract all optional keys from the given type.
|
|
78
78
|
|
|
@@ -107,10 +107,10 @@ const update2: UpdateOperation<User> = {
|
|
|
107
107
|
@category Utilities
|
|
108
108
|
*/
|
|
109
109
|
type OptionalKeysOf<Type extends object> = Type extends unknown // For distributing `Type`
|
|
110
|
-
? (keyof { [Key in keyof Type as IsOptionalKeyOf<Type, Key> extends false ? never : Key]: never }) & keyof Type // Intersect with `keyof Type` to ensure result of `OptionalKeysOf<Type>` is always assignable to `keyof Type`
|
|
111
|
-
: never;
|
|
110
|
+
? (keyof { [Key in keyof Type as IsOptionalKeyOf<Type, Key> extends false ? never : Key]: never; }) & keyof Type // Intersect with `keyof Type` to ensure result of `OptionalKeysOf<Type>` is always assignable to `keyof Type`
|
|
111
|
+
: never; // Should never happen
|
|
112
112
|
//#endregion
|
|
113
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
113
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/required-keys-of.d.ts
|
|
114
114
|
/**
|
|
115
115
|
Extract all required keys from the given type.
|
|
116
116
|
|
|
@@ -142,9 +142,9 @@ const validator3 = createValidation<User>('luckyNumber', value => value > 0);
|
|
|
142
142
|
@category Utilities
|
|
143
143
|
*/
|
|
144
144
|
type RequiredKeysOf<Type extends object> = Type extends unknown // For distributing `Type`
|
|
145
|
-
? Exclude<keyof Type, OptionalKeysOf<Type>> : never;
|
|
145
|
+
? Exclude<keyof Type, OptionalKeysOf<Type>> : never; // Should never happen
|
|
146
146
|
//#endregion
|
|
147
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
147
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/is-never.d.ts
|
|
148
148
|
/**
|
|
149
149
|
Returns a boolean for whether the given type is `never`.
|
|
150
150
|
|
|
@@ -200,7 +200,7 @@ type B = IsTrueFixed<never>;
|
|
|
200
200
|
*/
|
|
201
201
|
type IsNever<T> = [T] extends [never] ? true : false;
|
|
202
202
|
//#endregion
|
|
203
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
203
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/if.d.ts
|
|
204
204
|
/**
|
|
205
205
|
An if-else-like type that resolves depending on whether the given `boolean` type is `true` or `false`.
|
|
206
206
|
|
|
@@ -295,22 +295,22 @@ type Works = IncludesWithoutIf<HundredZeroes, '1'>;
|
|
|
295
295
|
*/
|
|
296
296
|
type If<Type extends boolean, IfBranch, ElseBranch> = IsNever<Type> extends true ? ElseBranch : Type extends true ? IfBranch : ElseBranch;
|
|
297
297
|
//#endregion
|
|
298
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
298
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/internal/type.d.ts
|
|
299
299
|
/**
|
|
300
300
|
An if-else-like type that resolves depending on whether the given type is `any` or `never`.
|
|
301
301
|
|
|
302
302
|
@example
|
|
303
303
|
```
|
|
304
|
-
// When `T` is
|
|
305
|
-
type A = IfNotAnyOrNever<string, 'VALID'
|
|
304
|
+
// When `T` is neither `any` nor `never` (like `string`) => Returns `IfNot` branch
|
|
305
|
+
type A = IfNotAnyOrNever<string, {ifNot: 'VALID'; ifAny: 'IS_ANY'; ifNever: 'IS_NEVER'}>;
|
|
306
306
|
//=> 'VALID'
|
|
307
307
|
|
|
308
308
|
// When `T` is `any` => Returns `IfAny` branch
|
|
309
|
-
type B = IfNotAnyOrNever<any, 'VALID'
|
|
309
|
+
type B = IfNotAnyOrNever<any, {ifNot: 'VALID'; ifAny: 'IS_ANY'; ifNever: 'IS_NEVER'}>;
|
|
310
310
|
//=> 'IS_ANY'
|
|
311
311
|
|
|
312
312
|
// When `T` is `never` => Returns `IfNever` branch
|
|
313
|
-
type C = IfNotAnyOrNever<never, 'VALID'
|
|
313
|
+
type C = IfNotAnyOrNever<never, {ifNot: 'VALID'; ifAny: 'IS_ANY'; ifNever: 'IS_NEVER'}>;
|
|
314
314
|
//=> 'IS_NEVER'
|
|
315
315
|
```
|
|
316
316
|
|
|
@@ -323,7 +323,7 @@ import type {StringRepeat} from 'type-fest';
|
|
|
323
323
|
type NineHundredNinetyNineSpaces = StringRepeat<' ', 999>;
|
|
324
324
|
|
|
325
325
|
// The following implementation is not tail recursive
|
|
326
|
-
type TrimLeft<S extends string> = IfNotAnyOrNever<S, S extends ` ${infer R}` ? TrimLeft<R> : S>;
|
|
326
|
+
type TrimLeft<S extends string> = IfNotAnyOrNever<S, {ifNot: S extends ` ${infer R}` ? TrimLeft<R> : S}>;
|
|
327
327
|
|
|
328
328
|
// Hence, instantiations with long strings will fail
|
|
329
329
|
// @ts-expect-error
|
|
@@ -332,7 +332,7 @@ type T1 = TrimLeft<NineHundredNinetyNineSpaces>;
|
|
|
332
332
|
// Error: Type instantiation is excessively deep and possibly infinite.
|
|
333
333
|
|
|
334
334
|
// To fix this, move the recursion into a helper type
|
|
335
|
-
type TrimLeftOptimised<S extends string> = IfNotAnyOrNever<S, _TrimLeftOptimised<S
|
|
335
|
+
type TrimLeftOptimised<S extends string> = IfNotAnyOrNever<S, {ifNot: _TrimLeftOptimised<S>}>;
|
|
336
336
|
|
|
337
337
|
type _TrimLeftOptimised<S extends string> = S extends ` ${infer R}` ? _TrimLeftOptimised<R> : S;
|
|
338
338
|
|
|
@@ -340,9 +340,13 @@ type T2 = TrimLeftOptimised<NineHundredNinetyNineSpaces>;
|
|
|
340
340
|
//=> ''
|
|
341
341
|
```
|
|
342
342
|
*/
|
|
343
|
-
type IfNotAnyOrNever<T,
|
|
343
|
+
type IfNotAnyOrNever<T, Cases extends {
|
|
344
|
+
ifNot: unknown;
|
|
345
|
+
ifAny?: unknown;
|
|
346
|
+
ifNever?: unknown;
|
|
347
|
+
}> = IsAny<T> extends true ? 'ifAny' extends keyof Cases ? Cases['ifAny'] : any : IsNever<T> extends true ? 'ifNever' extends keyof Cases ? Cases['ifNever'] : never : Cases['ifNot'];
|
|
344
348
|
//#endregion
|
|
345
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
349
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/simplify.d.ts
|
|
346
350
|
/**
|
|
347
351
|
Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability.
|
|
348
352
|
|
|
@@ -401,9 +405,9 @@ fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface`
|
|
|
401
405
|
@see {@link SimplifyDeep}
|
|
402
406
|
@category Object
|
|
403
407
|
*/
|
|
404
|
-
type Simplify<T> = { [KeyType in keyof T]: T[KeyType] } & {};
|
|
408
|
+
type Simplify<T> = { [KeyType in keyof T]: T[KeyType]; } & {};
|
|
405
409
|
//#endregion
|
|
406
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
410
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/is-equal.d.ts
|
|
407
411
|
/**
|
|
408
412
|
Returns a boolean for whether the two given types are equal.
|
|
409
413
|
|
|
@@ -434,7 +438,7 @@ type IsEqual<A, B> = [A] extends [B] ? [B] extends [A] ? _IsEqual<A, B> : false
|
|
|
434
438
|
// This version fails the `equalWrappedTupleIntersectionToBeNeverAndNeverExpanded` test in `test-d/is-equal.ts`.
|
|
435
439
|
type _IsEqual<A, B> = (<G>() => G extends A & G | G ? 1 : 2) extends (<G>() => G extends B & G | G ? 1 : 2) ? true : false;
|
|
436
440
|
//#endregion
|
|
437
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
441
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/omit-index-signature.d.ts
|
|
438
442
|
/**
|
|
439
443
|
Omit any index signatures from the given object type, leaving only explicitly defined properties.
|
|
440
444
|
|
|
@@ -526,9 +530,9 @@ type ExampleWithoutIndexSignatures = OmitIndexSignature<Example>;
|
|
|
526
530
|
@see {@link PickIndexSignature}
|
|
527
531
|
@category Object
|
|
528
532
|
*/
|
|
529
|
-
type OmitIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? never : KeyType]: ObjectType[KeyType] };
|
|
533
|
+
type OmitIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? never : KeyType]: ObjectType[KeyType]; };
|
|
530
534
|
//#endregion
|
|
531
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
535
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/pick-index-signature.d.ts
|
|
532
536
|
/**
|
|
533
537
|
Pick only index signatures from the given object type, leaving out all explicitly defined properties.
|
|
534
538
|
|
|
@@ -574,11 +578,11 @@ type ExampleIndexSignature = PickIndexSignature<Example>;
|
|
|
574
578
|
@see {@link OmitIndexSignature}
|
|
575
579
|
@category Object
|
|
576
580
|
*/
|
|
577
|
-
type PickIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? KeyType : never]: ObjectType[KeyType] };
|
|
581
|
+
type PickIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? KeyType : never]: ObjectType[KeyType]; };
|
|
578
582
|
//#endregion
|
|
579
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
583
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/merge.d.ts
|
|
580
584
|
// Merges two objects without worrying about index signatures.
|
|
581
|
-
type SimpleMerge<Destination, Source> = Simplify<{ [Key in keyof Destination as Key extends keyof Source ? never : Key]: Destination[Key] } & Source>;
|
|
585
|
+
type SimpleMerge<Destination, Source> = Simplify<{ [Key in keyof Destination as Key extends keyof Source ? never : Key]: Destination[Key]; } & Source>;
|
|
582
586
|
/**
|
|
583
587
|
Merge two types into a new type. Keys of the second type overrides keys of the first type.
|
|
584
588
|
|
|
@@ -642,13 +646,12 @@ Note: If you want a merge type that more accurately reflects the runtime behavio
|
|
|
642
646
|
@category Object
|
|
643
647
|
*/
|
|
644
648
|
type Merge<Destination, Source> = Destination extends unknown // For distributing `Destination`
|
|
645
|
-
? Source extends unknown // For distributing `Source`
|
|
646
|
-
? If<IsEqual<Destination, Source>, Destination, _Merge<Destination, Source>> : never // Should never happen
|
|
647
|
-
: never;
|
|
648
|
-
// Should never happen
|
|
649
|
+
? Source extends unknown // For distributing `Source`
|
|
650
|
+
? If<IsEqual<Destination, Source>, Destination, _Merge<Destination, Source>> : never // Should never happen
|
|
651
|
+
: never; // Should never happen
|
|
649
652
|
type _Merge<Destination, Source> = Simplify<SimpleMerge<PickIndexSignature<Destination>, PickIndexSignature<Source>> & SimpleMerge<OmitIndexSignature<Destination>, OmitIndexSignature<Source>>>;
|
|
650
653
|
//#endregion
|
|
651
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
654
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/internal/object.d.ts
|
|
652
655
|
/**
|
|
653
656
|
Merges user specified options with default options.
|
|
654
657
|
|
|
@@ -701,38 +704,11 @@ type Result = ApplyDefaultOptions<PathsOptions, DefaultPathsOptions, SpecifiedOp
|
|
|
701
704
|
// Types of property 'leavesOnly' are incompatible. Type 'string' is not assignable to type 'boolean'.
|
|
702
705
|
```
|
|
703
706
|
*/
|
|
704
|
-
type ApplyDefaultOptions<Options extends object, Defaults extends Simplify<Omit<Required<Options>, RequiredKeysOf<Options>> & Partial<Record<RequiredKeysOf<Options>, never>>>, SpecifiedOptions extends Options> = _ApplyDefaultOptions<Options, Defaults, SpecifiedOptions> extends infer Result extends Required<Options> // `extends Required<Options>` ensures that `ApplyDefaultOptions<SomeOption, ...>` is always assignable to `Required<SomeOption>`
|
|
705
|
-
? Result : never;
|
|
706
|
-
type _ApplyDefaultOptions<Options, Defaults, SpecifiedOptions> = If<IsAny<SpecifiedOptions>, Defaults, If<IsNever<SpecifiedOptions>, Defaults, Merge<Defaults, { [Key in keyof SpecifiedOptions as undefined extends Required<Options>[Key & keyof Options] ? Key : undefined extends SpecifiedOptions[Key] ? never : Key]: SpecifiedOptions[Key] }>>>;
|
|
707
|
-
/**
|
|
708
|
-
Collapses literal types in a union into their corresponding primitive types, when possible. For example, `CollapseLiterals<'foo' | 'bar' | (string & {})>` returns `string`.
|
|
709
|
-
|
|
710
|
-
Note: This doesn't collapse literals within tagged types. For example, `CollapseLiterals<Tagged<'foo' | (string & {}), 'Tag'>>` returns `("foo" & Tag<"Tag", never>) | (string & Tag<"Tag", never>)` and not `string & Tag<"Tag", never>`.
|
|
711
|
-
|
|
712
|
-
Use-case: For collapsing unions created using {@link LiteralUnion}.
|
|
713
|
-
|
|
714
|
-
@example
|
|
715
|
-
```
|
|
716
|
-
import type {LiteralUnion} from 'type-fest';
|
|
717
|
-
|
|
718
|
-
type A = CollapseLiterals<'foo' | 'bar' | (string & {})>;
|
|
719
|
-
//=> string
|
|
720
|
-
|
|
721
|
-
type B = CollapseLiterals<LiteralUnion<1 | 2 | 3, number>>;
|
|
722
|
-
//=> number
|
|
723
|
-
|
|
724
|
-
type C = CollapseLiterals<LiteralUnion<'onClick' | 'onChange', `on${string}`>>;
|
|
725
|
-
//=> `on${string}`
|
|
726
|
-
|
|
727
|
-
type D = CollapseLiterals<'click' | 'change' | (`on${string}` & {})>;
|
|
728
|
-
//=> 'click' | 'change' | `on${string}`
|
|
729
|
-
|
|
730
|
-
type E = CollapseLiterals<LiteralUnion<'foo' | 'bar', string> | null | undefined>;
|
|
731
|
-
//=> string | null | undefined
|
|
732
|
-
```
|
|
733
|
-
*/
|
|
707
|
+
type ApplyDefaultOptions<Options extends object, Defaults extends Simplify<Omit<Required<Options>, RequiredKeysOf<Options>> & Partial<Record<RequiredKeysOf<Options>, never>>>, SpecifiedOptions extends Options> = _ApplyDefaultOptions<Options, Defaults, SpecifiedOptions> extends (infer Result extends Required<Options> // `extends Required<Options>` ensures that `ApplyDefaultOptions<SomeOption, ...>` is always assignable to `Required<SomeOption>`
|
|
708
|
+
) ? Result : never;
|
|
709
|
+
type _ApplyDefaultOptions<Options, Defaults, SpecifiedOptions> = If<IsAny<SpecifiedOptions>, Defaults, If<IsNever<SpecifiedOptions>, Defaults, Merge<Defaults, { [Key in keyof SpecifiedOptions as undefined extends Required<Options>[Key & keyof Options] ? Key : undefined extends SpecifiedOptions[Key] ? never : Key]: SpecifiedOptions[Key]; }>>>;
|
|
734
710
|
//#endregion
|
|
735
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
711
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/except.d.ts
|
|
736
712
|
/**
|
|
737
713
|
Filter out keys from an object.
|
|
738
714
|
|
|
@@ -763,10 +739,12 @@ type Filtered = Filter<'bar', 'foo'>;
|
|
|
763
739
|
type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
764
740
|
type ExceptOptions = {
|
|
765
741
|
/**
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
742
|
+
Disallow assigning non-specified properties.
|
|
743
|
+
|
|
744
|
+
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
745
|
+
|
|
746
|
+
@default false
|
|
747
|
+
*/
|
|
770
748
|
requireExactProps?: boolean;
|
|
771
749
|
};
|
|
772
750
|
type DefaultExceptOptions = {
|
|
@@ -828,9 +806,9 @@ type PostPayloadFixed = Except<UserData, 'email'>;
|
|
|
828
806
|
@category Object
|
|
829
807
|
*/
|
|
830
808
|
type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {}> = _Except<ObjectType, KeysType, ApplyDefaultOptions<ExceptOptions, DefaultExceptOptions, Options>>;
|
|
831
|
-
type _Except<ObjectType, KeysType extends keyof ObjectType, Options extends Required<ExceptOptions>> = { [KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType] } & (Options['requireExactProps'] extends true ? Partial<Record<KeysType, never>> : {});
|
|
809
|
+
type _Except<ObjectType, KeysType extends keyof ObjectType, Options extends Required<ExceptOptions>> = { [KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType]; } & (Options['requireExactProps'] extends true ? Partial<Record<KeysType, never>> : {});
|
|
832
810
|
//#endregion
|
|
833
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
811
|
+
//#region ../../node_modules/.pnpm/type-fest@5.8.0/node_modules/type-fest/source/require-at-least-one.d.ts
|
|
834
812
|
/**
|
|
835
813
|
Create a type that requires at least one of the given keys, while keeping the remaining keys as is.
|
|
836
814
|
|
|
@@ -852,11 +830,14 @@ const responder: RequireAtLeastOne<Responder, 'text' | 'json'> = {
|
|
|
852
830
|
|
|
853
831
|
@category Object
|
|
854
832
|
*/
|
|
855
|
-
type RequireAtLeastOne<ObjectType, KeysType extends keyof ObjectType = keyof ObjectType> = IfNotAnyOrNever<ObjectType,
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
833
|
+
type RequireAtLeastOne<ObjectType, KeysType extends keyof ObjectType = keyof ObjectType> = IfNotAnyOrNever<ObjectType, {
|
|
834
|
+
ifNot: If<IsNever<KeysType>, never, _RequireAtLeastOne<ObjectType, If<IsAny<KeysType>, keyof ObjectType, KeysType>>>;
|
|
835
|
+
}>;
|
|
836
|
+
type _RequireAtLeastOne<ObjectType, KeysType extends keyof ObjectType> = { [
|
|
837
|
+
// For each `Key` in `KeysType` make a mapped type:
|
|
838
|
+
Key in KeysType]-?: Required<Pick<ObjectType, Key>> // 1. Make `Key`'s type required
|
|
839
|
+
& Partial<Pick<ObjectType, Exclude<KeysType, Key>>> // 2. Make all other keys in `KeysType` optional
|
|
840
|
+
; }[KeysType] & Except<ObjectType, KeysType>; // 3. Add the remaining keys not in `KeysType`
|
|
860
841
|
//#endregion
|
|
861
842
|
//#region src-js/plugins/tokens.d.ts
|
|
862
843
|
/**
|
|
@@ -1247,7 +1228,7 @@ interface StrictVisitorObject {
|
|
|
1247
1228
|
TSUnionType?: (node: TSUnionType) => void;
|
|
1248
1229
|
"TSUnionType:exit"?: (node: TSUnionType) => void;
|
|
1249
1230
|
}
|
|
1250
|
-
type VisitorObject = { [K in keyof StrictVisitorObject]?: BivarianceHackHandler<Exclude<StrictVisitorObject[K], undefined>> | undefined } & Record<string, BivarianceHackHandler<(node: Node) => void> | undefined>;
|
|
1231
|
+
type VisitorObject = { [K in keyof StrictVisitorObject]?: BivarianceHackHandler<Exclude<StrictVisitorObject[K], undefined>> | undefined; } & Record<string, BivarianceHackHandler<(node: Node) => void> | undefined>;
|
|
1251
1232
|
//#endregion
|
|
1252
1233
|
//#region src-js/plugins/types.d.ts
|
|
1253
1234
|
type BeforeHook = () => boolean | void;
|
|
@@ -1367,7 +1348,7 @@ interface BindingIdentifier extends Span {
|
|
|
1367
1348
|
decorators?: [];
|
|
1368
1349
|
name: string;
|
|
1369
1350
|
optional?: false;
|
|
1370
|
-
typeAnnotation?: null;
|
|
1351
|
+
typeAnnotation?: TSTypeAnnotation | null;
|
|
1371
1352
|
parent: Node;
|
|
1372
1353
|
}
|
|
1373
1354
|
interface LabelIdentifier extends Span {
|
|
@@ -1780,7 +1761,7 @@ interface ObjectPattern extends Span {
|
|
|
1780
1761
|
decorators?: [];
|
|
1781
1762
|
properties: Array<BindingProperty | BindingRestElement>;
|
|
1782
1763
|
optional?: false;
|
|
1783
|
-
typeAnnotation?: null;
|
|
1764
|
+
typeAnnotation?: TSTypeAnnotation | null;
|
|
1784
1765
|
parent: Node;
|
|
1785
1766
|
}
|
|
1786
1767
|
interface BindingProperty extends Span {
|
|
@@ -1799,7 +1780,7 @@ interface ArrayPattern extends Span {
|
|
|
1799
1780
|
decorators?: [];
|
|
1800
1781
|
elements: Array<BindingPattern | BindingRestElement | null>;
|
|
1801
1782
|
optional?: false;
|
|
1802
|
-
typeAnnotation?: null;
|
|
1783
|
+
typeAnnotation?: TSTypeAnnotation | null;
|
|
1803
1784
|
parent: Node;
|
|
1804
1785
|
}
|
|
1805
1786
|
interface BindingRestElement extends Span {
|
|
@@ -1807,7 +1788,7 @@ interface BindingRestElement extends Span {
|
|
|
1807
1788
|
decorators?: [];
|
|
1808
1789
|
argument: BindingPattern;
|
|
1809
1790
|
optional?: false;
|
|
1810
|
-
typeAnnotation?: null;
|
|
1791
|
+
typeAnnotation?: TSTypeAnnotation | null;
|
|
1811
1792
|
value?: null;
|
|
1812
1793
|
parent: Node;
|
|
1813
1794
|
}
|
|
@@ -2675,9 +2656,6 @@ interface Definition {
|
|
|
2675
2656
|
}
|
|
2676
2657
|
type DefinitionType = "CatchClause" | "ClassName" | "FunctionName" | "ImplicitGlobalVariable" | "ImportBinding" | "Parameter" | "Variable";
|
|
2677
2658
|
type Identifier = IdentifierName | IdentifierReference | BindingIdentifier | LabelIdentifier | TSThisParameter | TSIndexSignatureName;
|
|
2678
|
-
/**
|
|
2679
|
-
* Discard TS-ESLint `ScopeManager`, to free memory.
|
|
2680
|
-
*/
|
|
2681
2659
|
/**
|
|
2682
2660
|
* Determine whether the given identifier node is a reference to a global variable.
|
|
2683
2661
|
* @param node - `Identifier` node to check.
|
|
@@ -3084,12 +3062,12 @@ type Envs$1 = Record<string, true>;
|
|
|
3084
3062
|
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1
|
|
3085
3063
|
*/
|
|
3086
3064
|
type JSONSchema4TypeName = "string" //
|
|
3087
|
-
| "number" | "integer" | "boolean" | "object" | "array" | "null" | "any";
|
|
3065
|
+
| "number" | "integer" | "boolean" | "object" | "array" | "null" | "any";
|
|
3088
3066
|
/**
|
|
3089
3067
|
* @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-3.5
|
|
3090
3068
|
*/
|
|
3091
3069
|
type JSONSchema4Type = string //
|
|
3092
|
-
| number | boolean | JSONSchema4Object | JSONSchema4Array | null;
|
|
3070
|
+
| number | boolean | JSONSchema4Object | JSONSchema4Array | null;
|
|
3093
3071
|
// Workaround for infinite type recursion
|
|
3094
3072
|
interface JSONSchema4Object {
|
|
3095
3073
|
[key: string]: JSONSchema4Type;
|
|
@@ -3357,9 +3335,6 @@ interface SuggestionBase {
|
|
|
3357
3335
|
data?: DiagnosticData | null | undefined;
|
|
3358
3336
|
fix: FixFn;
|
|
3359
3337
|
}
|
|
3360
|
-
/**
|
|
3361
|
-
* Suggested fix in form sent to Rust.
|
|
3362
|
-
*/
|
|
3363
3338
|
//#endregion
|
|
3364
3339
|
//#region src-js/plugins/source_code.d.ts
|
|
3365
3340
|
declare const SOURCE_CODE: Readonly<{
|
|
@@ -4100,12 +4075,6 @@ interface LanguageOptions {
|
|
|
4100
4075
|
env?: Envs;
|
|
4101
4076
|
parserOptions?: ParserOptions;
|
|
4102
4077
|
}
|
|
4103
|
-
/**
|
|
4104
|
-
* Language options config, with `parser` and `ecmaVersion` properties, and extended `parserOptions`.
|
|
4105
|
-
* These properties should not be present in `languageOptions` config,
|
|
4106
|
-
* but could be if test cases are ported from ESLint.
|
|
4107
|
-
* For internal use only.
|
|
4108
|
-
*/
|
|
4109
4078
|
/**
|
|
4110
4079
|
* Source type.
|
|
4111
4080
|
*
|
|
@@ -4143,12 +4112,6 @@ interface ParserOptions {
|
|
|
4143
4112
|
*/
|
|
4144
4113
|
ignoreNonFatalErrors?: boolean;
|
|
4145
4114
|
}
|
|
4146
|
-
/**
|
|
4147
|
-
* Parser options config, with extended `ecmaFeatures`.
|
|
4148
|
-
* These properties should not be present in `languageOptions` config,
|
|
4149
|
-
* but could be if test cases are ported from ESLint.
|
|
4150
|
-
* For internal use only.
|
|
4151
|
-
*/
|
|
4152
4115
|
/**
|
|
4153
4116
|
* ECMA features config.
|
|
4154
4117
|
*/
|
|
@@ -4160,12 +4123,6 @@ interface EcmaFeatures {
|
|
|
4160
4123
|
*/
|
|
4161
4124
|
jsx?: boolean;
|
|
4162
4125
|
}
|
|
4163
|
-
/**
|
|
4164
|
-
* ECMA features config, with `globalReturn` and `impliedStrict` properties.
|
|
4165
|
-
* These properties should not be present in `ecmaFeatures` config,
|
|
4166
|
-
* but could be if test cases are ported from ESLint.
|
|
4167
|
-
* For internal use only.
|
|
4168
|
-
*/
|
|
4169
4126
|
/**
|
|
4170
4127
|
* Parser language.
|
|
4171
4128
|
*/
|
package/dist/plugins-dev.js
CHANGED
|
@@ -10,7 +10,7 @@ var import_json_stable_stringify_without_jsonify = /* @__PURE__ */ __toESM((/* @
|
|
|
10
10
|
opts ||= {}, typeof opts == "function" && (opts = { cmp: opts });
|
|
11
11
|
var space = opts.space || "";
|
|
12
12
|
typeof space == "number" && (space = Array(space + 1).join(" "));
|
|
13
|
-
var cycles = typeof opts.cycles == "boolean"
|
|
13
|
+
var cycles = typeof opts.cycles == "boolean" && opts.cycles, replacer = opts.replacer || function(key, value) {
|
|
14
14
|
return value;
|
|
15
15
|
}, cmp = opts.cmp && (function(f) {
|
|
16
16
|
return function(node) {
|