Skip to content

Commit

Permalink
feat: update code to not need implicit any, add hasProperty util (#9394)
Browse files Browse the repository at this point in the history
* update deps including typescript
* fix a few issues along the way
* improve code robustness for example for type checks and index accesses
* remove need for suppressImplicitAnyIndexErrors
* introduces new utility method `hasProperty` which checks whether the
object has the property and it's not undefined
  • Loading branch information
domoritz authored Aug 2, 2024
1 parent 41c445c commit 6ce344e
Show file tree
Hide file tree
Showing 141 changed files with 1,872 additions and 2,559 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions/setup-node@v4
with:
cache: 'yarn'
node-version: 21
node-version: 20

- name: Install Node dependencies
run: yarn --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/setup-node@v4
with:
cache: 'yarn'
node-version: 21
node-version: 20

- name: Install Node dependencies
run: yarn --frozen-lockfile
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-docs-and-schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: actions/setup-node@v4
with:
cache: 'yarn'
node-version: 21
node-version: 20

- name: Install Node dependencies
run: yarn --frozen-lockfile
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
uses: actions/setup-node@v4
with:
cache: 'yarn'
node-version: 21
node-version: 20

- name: Setup Pages
uses: actions/configure-pages@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: actions/setup-node@v4
with:
cache: 'yarn'
node-version: 21
node-version: 20

- name: Install Node dependencies
run: yarn --frozen-lockfile
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/setup-node@v4
with:
cache: 'yarn'
node-version: 21
node-version: 20

- name: Install Node dependencies
run: yarn --frozen-lockfile
Expand All @@ -44,7 +44,7 @@ jobs:
uses: actions/setup-node@v4
with:
cache: 'yarn'
node-version: 21
node-version: 20

- name: Install Node dependencies
run: yarn --frozen-lockfile
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
uses: actions/setup-node@v4
with:
cache: 'yarn'
node-version: 21
node-version: 20

- name: Install Node dependencies
run: yarn --frozen-lockfile
Expand Down
104 changes: 38 additions & 66 deletions build/vega-lite-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4428,46 +4428,37 @@
]
},
"BinnedTimeUnit": {
"anyOf": [
{
"enum": [
"binnedyear",
"binnedyearquarter",
"binnedyearquartermonth",
"binnedyearmonth",
"binnedyearmonthdate",
"binnedyearmonthdatehours",
"binnedyearmonthdatehoursminutes",
"binnedyearmonthdatehoursminutesseconds",
"binnedyearweek",
"binnedyearweekday",
"binnedyearweekdayhours",
"binnedyearweekdayhoursminutes",
"binnedyearweekdayhoursminutesseconds",
"binnedyeardayofyear"
],
"type": "string"
},
{
"enum": [
"binnedutcyear",
"binnedutcyearquarter",
"binnedutcyearquartermonth",
"binnedutcyearmonth",
"binnedutcyearmonthdate",
"binnedutcyearmonthdatehours",
"binnedutcyearmonthdatehoursminutes",
"binnedutcyearmonthdatehoursminutesseconds",
"binnedutcyearweek",
"binnedutcyearweekday",
"binnedutcyearweekdayhours",
"binnedutcyearweekdayhoursminutes",
"binnedutcyearweekdayhoursminutesseconds",
"binnedutcyeardayofyear"
],
"type": "string"
}
]
"enum": [
"binnedyear",
"binnedyearquarter",
"binnedyearquartermonth",
"binnedyearmonth",
"binnedyearmonthdate",
"binnedyearmonthdatehours",
"binnedyearmonthdatehoursminutes",
"binnedyearmonthdatehoursminutesseconds",
"binnedyearweek",
"binnedyearweekday",
"binnedyearweekdayhours",
"binnedyearweekdayhoursminutes",
"binnedyearweekdayhoursminutesseconds",
"binnedyeardayofyear",
"binnedutcyear",
"binnedutcyearquarter",
"binnedutcyearquartermonth",
"binnedutcyearmonth",
"binnedutcyearmonthdate",
"binnedutcyearmonthdatehours",
"binnedutcyearmonthdatehoursminutes",
"binnedutcyearmonthdatehoursminutesseconds",
"binnedutcyearweek",
"binnedutcyearweekday",
"binnedutcyearweekdayhours",
"binnedutcyearweekdayhoursminutes",
"binnedutcyearweekdayhoursminutesseconds",
"binnedutcyeardayofyear"
],
"type": "string"
},
"Blend": {
"enum": [
Expand Down Expand Up @@ -4761,7 +4752,8 @@
"set2",
"set3",
"tableau10",
"tableau20"
"tableau20",
"observable10"
],
"type": "string"
},
Expand Down Expand Up @@ -19238,29 +19230,9 @@
"type": "object"
},
"ParseValue": {
"anyOf": [
{
"type": "null"
},
{
"type": "string"
},
{
"const": "string",
"type": "string"
},
{
"const": "boolean",
"type": "string"
},
{
"const": "date",
"type": "string"
},
{
"const": "number",
"type": "string"
}
"type": [
"string",
"null"
]
},
"PivotTransform": {
Expand Down Expand Up @@ -27685,6 +27657,8 @@
},
"SingleDefUnitChannel": {
"enum": [
"text",
"shape",
"x",
"y",
"xOffset",
Expand All @@ -27709,9 +27683,7 @@
"strokeDash",
"size",
"angle",
"shape",
"key",
"text",
"href",
"url",
"description"
Expand Down
2 changes: 1 addition & 1 deletion examples/compiled/area_cumulative_freq.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/compiled/area_invalid_null.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6ce344e

Please sign in to comment.