fastify / fastify-type-provider-typebox

A Type Provider for Typebox
MIT License
148 stars 25 forks source link

Couldn't use Type.BigInt in the nest Type.Object in the item of Type.Array #148

Open cw1997 opened 4 months ago

cw1997 commented 4 months ago

Prerequisites

Fastify version

4.27.0

Plugin version

No response

Node.js version

20.9.0

Operating system

Windows

Operating system version (i.e. 20.04, 11.3, 10)

10

Description

As you could see in the https://stackblitz.com/edit/stackblitz-starters-aysb1e?description=A%20simple%20starter%20for%20using%20nodemon%20printing%20no%20messages%20in%20a%20terminal&file=package.json,index.ts&title=Nodemon%20Starter

image

Link to code that reproduces the bug

No response

Expected Behavior

I could use the schema as

Type.Object({
  post: Type.Array(
    Type.Object({
      id: Type.BigInt(), // if using BigInt it will not work!
      // id: Type.Number(), // if using Number it will work!
      desc: Type.String(),
    })
  ),
}),
beautyfree commented 1 month ago

have same issue