Effect CommunityEC
Effect Community2y ago
5 replies
andreslaley

Error Generating JSON Schema for `bigint` in TypeScript

Hi, I am trying to generate the following schema but I get the error: cannot build a JSON Schema for bigint without a JSON Schema annotation (path ["telegramUserId"])

const userSchema = Schema.Struct({
  telegramUserId: Schema.Union(Schema.Null, Schema.BigIntFromSelf),
});

export type User = Schema.Schema.Type<typeof userSchema>;
export const UserSchema = JSONSchema.make(userSchema);
Was this page helpful?