Skip to content

Commit

Permalink
fix: correct types for domain unionWith (#9131)
Browse files Browse the repository at this point in the history
* fix: correct types for domain unionWith

* chore: update schema [CI]

---------

Co-authored-by: GitHub Actions Bot <vega-actions-bot@users.noreply.github.com>
  • Loading branch information
kanitw and GitHub Actions Bot committed Oct 9, 2023
1 parent bd014eb commit 6f66759
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 21 deletions.
31 changes: 11 additions & 20 deletions build/vega-lite-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8330,33 +8330,24 @@
"additionalProperties": false,
"properties": {
"unionWith": {
"anyOf": [
{
"items": {
"description": "Customized domain values to be union with the field's values or explicitly defined domain. Should be an array of valid scale domain values.",
"items": {
"anyOf": [
{
"type": "number"
},
"type": "array"
},
{
"items": {
{
"type": "string"
},
"type": "array"
},
{
"items": {
{
"type": "boolean"
},
"type": "array"
},
{
"items": {
{
"$ref": "#/definitions/DateTime"
},
"type": "array"
}
],
"description": "Customized domain values to be union with the field's values or explicitly defined domain. Should be an array of valid scale domain values."
}
]
},
"type": "array"
}
},
"required": [
Expand Down
2 changes: 1 addition & 1 deletion src/scale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ export interface DomainUnionWith {
* Customized domain values to be union with the field's values or explicitly defined domain.
* Should be an array of valid scale domain values.
*/
unionWith: number[] | string[] | boolean[] | DateTime[];
unionWith: (number | string | boolean | DateTime)[];
}

export function isDomainUnionWith(domain: Domain): domain is DomainUnionWith {
Expand Down

0 comments on commit 6f66759

Please sign in to comment.