lukeautry / tsoa

Build OpenAPI-compliant REST APIs using TypeScript and Node
MIT License
3.45k stars 494 forks source link

Error: Unknown type: BigIntKeyword #1476

Closed Super-Nim closed 10 months ago

Super-Nim commented 1 year ago

Tsoa doesn't recognise bigint types and returns the error Error: Unknown type: BigIntKeyword.

Sorting

Expected Behavior

Tsoa should recognise bigint types and not return Error: Unknown type: BigIntKeyword.

I know there were two closed issues for this, but none gave a valid solution.

Can I get a valid solution for this?

Current Behavior

Possible Solution

Steps to Reproduce

      1. 4.

Context (Environment)

Version of the library: Version of NodeJS:

Detailed Description

Breaking change?

github-actions[bot] commented 1 year ago

Hello there Super-Nim 👋

Thank you for opening your very first issue in this project.

We will try to get back to you as soon as we can.👀

WoH commented 1 year ago

This is somewhat intended (You can't serialize it as a JSON). Serialize it as lossy number or as string, and type that.

Super-Nim commented 1 year ago

This is somewhat intended (You can't serialize it as a JSON). Serialize it as lossy number or as string, and type that.

Ok, that makes sense. The typeError is from an imported package that uses bigint in some of its custom types, is there a way to configure this in tsoa.json?

bipiane commented 12 months ago

I have the same issue when trying to reuse the types generated by Prisma ORM.

github-actions[bot] commented 11 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days