Back

Typescript, tests

  • 0
  • General
Camo
13 Feb, 2024, 20:34

Is there a way to get the types from collection? I'm currently starting to make a base for my functions, and want to understand if its possible, to not type everything manually. I'm just starting out with typescript, any suggestions would be welcome. Here's an example of what I have done so far.

TL;DR
Developers are asking if there is a way to auto-generate types from a collection in TypeScript instead of manually typing everything. One suggestion is to use a tool called fetch-appwrite-types from GitHub. Another recommendation is to use the tool quicktype.io.
Camo
13 Feb, 2024, 20:35
Steven
13 Feb, 2024, 20:41

We plan to add some way to auto generate types, but for now, you'll have to generate your own. Some people from the community have come up with stuff. For example: https://github.com/YsarocK/fetch-appwrite-types. I often user this tool: https://quicktype.io/

Camo
13 Feb, 2024, 20:43

thank you, will take a look

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more