Skip to content

Commit c64f528

Browse files
chore: update typescript to 5.3.3 (#2406)
* chore: update typescript to 5.3.3 * test: result should always be a Promise
1 parent 5370b84 commit c64f528

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
"rollup-plugin-terser": "^7.0.2",
105105
"ts-node": "^10.9.2",
106106
"tsify": "^5.0.4",
107-
"typescript": "^4.9.5"
107+
"typescript": "5.3.3"
108108
},
109109
"collective": {
110110
"type": "opencollective",

spec/types/async-validate.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ describe("$async validation and type guards", () => {
109109
const data: unknown = {foo: 1}
110110
let result: boolean | Promise<Foo>
111111
if ((result = validate(data))) {
112-
if (typeof result == "boolean") {
113-
data.foo.should.equal(1)
114-
} else {
112+
if (result instanceof Promise) {
115113
await result.then((_data) => _data.foo.should.equal(1))
114+
} else {
115+
should.fail()
116116
}
117117
} else {
118118
should.fail()

0 commit comments

Comments
 (0)