Skip to content

Commit

Permalink
chore: update typescript to 5.3.3 (#2406)
Browse files Browse the repository at this point in the history
* chore: update typescript to 5.3.3

* test: result should always be a Promise
  • Loading branch information
jasoniangreen authored Apr 27, 2024
1 parent 5370b84 commit c64f528
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"rollup-plugin-terser": "^7.0.2",
"ts-node": "^10.9.2",
"tsify": "^5.0.4",
"typescript": "^4.9.5"
"typescript": "5.3.3"
},
"collective": {
"type": "opencollective",
Expand Down
6 changes: 3 additions & 3 deletions spec/types/async-validate.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ describe("$async validation and type guards", () => {
const data: unknown = {foo: 1}
let result: boolean | Promise<Foo>
if ((result = validate(data))) {
if (typeof result == "boolean") {
data.foo.should.equal(1)
} else {
if (result instanceof Promise) {
await result.then((_data) => _data.foo.should.equal(1))
} else {
should.fail()
}
} else {
should.fail()
Expand Down

0 comments on commit c64f528

Please sign in to comment.