Skip to content

Commit 0cf1a8a

Browse files
committed
chore(types): update index.tst.ts
1 parent 7e37c7e commit 0cf1a8a

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

types/index.tst.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ import { expect } from 'tstyche'
88
const app = fastify()
99
app.register(middiePlugin)
1010

11-
expect({}).type.toBeAssignableTo<FastifyMiddieOptions>()
12-
13-
expect({ body: { foo: 'bar' }, query: { bar: 'foo' } }).type.toBeAssignableTo<IncomingMessageExtended>()
14-
expect({}).type.toBeAssignableTo<IncomingMessageExtended>()
11+
expect<FastifyMiddieOptions>().type.toBeAssignableFrom({})
12+
expect<IncomingMessageExtended>().type.toBeAssignableFrom({ body: { foo: 'bar' }, query: { bar: 'foo' } })
13+
expect<IncomingMessageExtended>().type.toBeAssignableFrom({})
1514

1615
app.use('/', (_req, _res, next) => {
17-
expect<any>().type.toBeAssignableTo<IncomingMessageExtended['body']>()
18-
expect<any>().type.toBeAssignableTo<IncomingMessageExtended['query']>()
16+
expect(_req.body).type.toBe<any>()
17+
expect(_req.query).type.toBe<any>()
1918
next()
2019
})
2120

0 commit comments

Comments
 (0)