Skip to content

Commit

Permalink
Apply requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bolariin committed May 6, 2021
1 parent 743b190 commit 0d1e2f9
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 343 deletions.
33 changes: 19 additions & 14 deletions declarations/WebpackOptions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,21 +240,8 @@ export type RuleSetConditionOrConditions = RuleSetCondition | RuleSetConditions;
export type RuleSetCondition =
| RegExp
| string
| {
/**
* Logical AND.
*/
and?: RuleSetCondition;
/**
* Logical NOT.
*/
not?: RuleSetCondition;
/**
* Logical OR.
*/
or?: RuleSetCondition;
}
| ((value: string) => boolean)
| RuleSetLogicalConditions
| RuleSetConditions;
/**
* A list of rule conditions.
Expand Down Expand Up @@ -1438,6 +1425,24 @@ export interface RuleSetRule {
*/
use?: RuleSetUse;
}
/**
* This interface was referenced by `WebpackOptions`'s JSON-Schema
* via the `definition` "RuleSetLogicalConditions".
*/
export interface RuleSetLogicalConditions {
/**
* Logical AND.
*/
and?: RuleSetConditions;
/**
* Logical NOT.
*/
not?: RuleSetCondition;
/**
* Logical OR.
*/
or?: RuleSetConditions;
}
/**
* Options object for resolving requests.
*/
Expand Down
2 changes: 1 addition & 1 deletion schemas/WebpackOptions.check.js

Large diffs are not rendered by default.

63 changes: 33 additions & 30 deletions schemas/WebpackOptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3372,40 +3372,13 @@
{
"type": "string"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"and": {
"description": "Logical AND.",
"oneOf": [
{
"$ref": "#/definitions/RuleSetCondition"
}
]
},
"not": {
"description": "Logical NOT.",
"oneOf": [
{
"$ref": "#/definitions/RuleSetCondition"
}
]
},
"or": {
"description": "Logical OR.",
"oneOf": [
{
"$ref": "#/definitions/RuleSetCondition"
}
]
}
}
},
{
"instanceof": "Function",
"tsType": "((value: string) => boolean)"
},
{
"$ref": "#/definitions/RuleSetLogicalConditions"
},
{
"$ref": "#/definitions/RuleSetConditions"
}
Expand Down Expand Up @@ -3532,6 +3505,36 @@
}
]
},
"RuleSetLogicalConditions": {
"type": "object",
"additionalProperties": false,
"properties": {
"and": {
"description": "Logical AND.",
"oneOf": [
{
"$ref": "#/definitions/RuleSetConditions"
}
]
},
"not": {
"description": "Logical NOT.",
"oneOf": [
{
"$ref": "#/definitions/RuleSetCondition"
}
]
},
"or": {
"description": "Logical OR.",
"oneOf": [
{
"$ref": "#/definitions/RuleSetConditions"
}
]
}
}
},
"RuleSetRule": {
"description": "A rule description with conditions and effects for modules.",
"type": "object",
Expand Down

0 comments on commit 0d1e2f9

Please sign in to comment.