Skip to content

Generate d.ts file of typebox so big and repetitive #992

Answered by ehaynes99
fortezhuo asked this question in Q&A
Discussion options

You must be logged in to vote

I'm sharing literally thousands of schemas between projects in a monorepo that get MUCH larger than those in the definition files, and I've never run into this. The largest .d.ts I have is 423k, and there are a lot of complicated unions/intersections. I also don't get it with the sample you supplied. If this is an excerpt from a larger project, are you sure that none of the problematic definitions has recursion in it? It's going to get really tedious double-declaring everything like that.

Also, unrelated but there is no need for additionalProperties: false with primitive types like Type.String.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ehaynes99
Comment options

Answer selected by fortezhuo
@fortezhuo
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants