Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks done
cw1997 opened this issue May 27, 2024 · 1 comment
Open
2 tasks done

Comments

@cw1997
Copy link

cw1997 commented May 27, 2024

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

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
Copy link

have same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants