to clarify, I did manage to create custom types th...
# community-help
u
to clarify, I did manage to create custom types that I can pass into collections (
collections<SomethingType>('something')
) but I was hoping there would be some sort of way to auto-generate these from the schema definition
k
cc @Jason Bosco
j
@Udo The collection schema type that Typesense uses has metadata fields in it, that your document will not have. Also the Typesense schema can also change dynamically on the Typesense server side. This is why it’s hard to rely on the collection schema to generate the type for your document
👍 1
In any case, the assumption is that you already have a type defined for your document, and you can pass that into the Typesense library like you’ve mentioned above
u
@Jason Bosco thanks for clarifying. I guess I'm just spoiled from using prisma 😉 I understand it's not the same thing and has some caveats...The lack of documentation just made me doubt if I'm missing something here. A short note about working with typescript in the README would be very helpful for newcomers
j
I’m not a Typescript expert myself, so if you want to add a note to the README in a PR about how to use with Typescript, that would be awesome!
u
sure thing
🙏 1