Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolve mismatch with types declaration and docs for resourceQuery #13296

Merged
merged 6 commits into from May 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
64 changes: 36 additions & 28 deletions declarations/WebpackOptions.d.ts
Expand Up @@ -240,21 +240,8 @@ export type RuleSetConditionOrConditions = RuleSetCondition | RuleSetConditions;
export type RuleSetCondition =
| RegExp
| string
| {
/**
* Logical AND.
*/
and?: RuleSetConditions;
/**
* Logical NOT.
*/
not?: RuleSetConditions;
/**
* Logical OR.
*/
or?: RuleSetConditions;
}
| ((value: string) => boolean)
| RuleSetLogicalConditions
| RuleSetConditions;
/**
* A list of rule conditions.
Expand All @@ -272,21 +259,8 @@ export type RuleSetConditionOrConditionsAbsolute =
export type RuleSetConditionAbsolute =
| RegExp
| string
| {
/**
* Logical AND.
*/
and?: RuleSetConditionsAbsolute;
/**
* Logical NOT.
*/
not?: RuleSetConditionsAbsolute;
/**
* Logical OR.
*/
or?: RuleSetConditionsAbsolute;
}
| ((value: string) => boolean)
| RuleSetLogicalConditionsAbsolute
| RuleSetConditionsAbsolute;
/**
* A list of rule conditions matching an absolute path.
Expand Down Expand Up @@ -1438,6 +1412,40 @@ export interface RuleSetRule {
*/
use?: RuleSetUse;
}
/**
* Logic operators used in a condition matcher.
*/
export interface RuleSetLogicalConditions {
/**
* Logical AND.
*/
and?: RuleSetConditions;
/**
* Logical NOT.
*/
not?: RuleSetCondition;
/**
* Logical OR.
*/
or?: RuleSetConditions;
}
/**
* Logic operators used in a condition matcher.
*/
export interface RuleSetLogicalConditionsAbsolute {
/**
* Logical AND.
*/
and?: RuleSetConditionsAbsolute;
/**
* Logical NOT.
*/
not?: RuleSetConditionAbsolute;
/**
* Logical OR.
*/
or?: RuleSetConditionsAbsolute;
}
/**
* Options object for resolving requests.
*/
Expand Down
2 changes: 1 addition & 1 deletion schemas/WebpackOptions.check.js

Large diffs are not rendered by default.

128 changes: 68 additions & 60 deletions schemas/WebpackOptions.json
Expand Up @@ -3391,40 +3391,13 @@
{
"type": "string"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"and": {
"description": "Logical AND.",
"oneOf": [
{
"$ref": "#/definitions/RuleSetConditions"
}
]
},
"not": {
"description": "Logical NOT.",
"oneOf": [
{
"$ref": "#/definitions/RuleSetConditions"
}
]
},
"or": {
"description": "Logical OR.",
"oneOf": [
{
"$ref": "#/definitions/RuleSetConditions"
}
]
}
}
},
{
"instanceof": "Function",
"tsType": "((value: string) => boolean)"
},
{
"$ref": "#/definitions/RuleSetLogicalConditions"
},
{
"$ref": "#/definitions/RuleSetConditions"
}
Expand All @@ -3444,40 +3417,13 @@
"type": "string",
"absolutePath": true
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"and": {
"description": "Logical AND.",
"oneOf": [
{
"$ref": "#/definitions/RuleSetConditionsAbsolute"
}
]
},
"not": {
"description": "Logical NOT.",
"oneOf": [
{
"$ref": "#/definitions/RuleSetConditionsAbsolute"
}
]
},
"or": {
"description": "Logical OR.",
"oneOf": [
{
"$ref": "#/definitions/RuleSetConditionsAbsolute"
}
]
}
}
},
{
"instanceof": "Function",
"tsType": "((value: string) => boolean)"
},
{
"$ref": "#/definitions/RuleSetLogicalConditionsAbsolute"
},
{
"$ref": "#/definitions/RuleSetConditionsAbsolute"
}
Expand Down Expand Up @@ -3551,6 +3497,68 @@
}
]
},
"RuleSetLogicalConditions": {
"description": "Logic operators used in a condition matcher.",
"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"
}
]
}
}
},
"RuleSetLogicalConditionsAbsolute": {
"description": "Logic operators used in a condition matcher.",
"type": "object",
"additionalProperties": false,
"properties": {
"and": {
"description": "Logical AND.",
"oneOf": [
{
"$ref": "#/definitions/RuleSetConditionsAbsolute"
}
]
},
"not": {
"description": "Logical NOT.",
"oneOf": [
{
"$ref": "#/definitions/RuleSetConditionAbsolute"
}
]
},
"or": {
"description": "Logical OR.",
"oneOf": [
{
"$ref": "#/definitions/RuleSetConditionsAbsolute"
}
]
}
}
},
"RuleSetRule": {
"description": "A rule description with conditions and effects for modules.",
"type": "object",
Expand Down