Skip to content

Commit 45b9670

Browse files
committed
Update chai create type.
1 parent 97a2d25 commit 45b9670

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/driver/src/cy/chai.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,12 @@ let restoreAsserts = null
4545
let overrideExpect = null
4646
let overrideChaiAsserts = null
4747

48-
export let create: ((specWindow, state, assertFn) => ({
48+
type CreateFunc = ((specWindow, state, assertFn) => ({
4949
chai: Chai.ChaiStatic
5050
expect: (val: any, message?: string) => Chai.Assertion
5151
assert: any
52-
})) | null = null
52+
}))
53+
export let create: CreateFunc | null = null
5354

5455
chai.use(sinonChai)
5556

@@ -549,7 +550,7 @@ chai.use((chai, u) => {
549550
})
550551

551552
export interface IChai {
552-
expect: ReturnType<typeof create>['expect']
553+
expect: ReturnType<CreateFunc>['expect']
553554
}
554555

555556
export default {

0 commit comments

Comments
 (0)