-
Notifications
You must be signed in to change notification settings - Fork 4.4k
🚀 Feature: Function init via CLI with Typescript #5832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Here's my tsconfig for imports/exports support
|
Don't forget to add |
My node version is 18.12.0 But good point, it should be optimized as best as it can be in case such issue can arise. |
I would love to have first-class TS support for Appwrite. |
Small update on this With new 1.4.3 functions, I have adjusted my tsconfig.json file
|
I do not understand how to get this to work . I am also not sure where the best place is to create the functions folder from appwrite init function. |
I pinged you on discord about it. My comment and TS stuff is a bit older than what I currently have. You can check it out https://github.com/mbos2/url-shortener/tree/main/functions/url-shortener. It's pretty straightforward. |
For now, my favorite option to use Typescript with Appwrite is to use the Bun runtime. |
Switching to Bun, just as I learn something new, it seems to work fine (hot reload), while Typescript is not doing the same. Thanks @mariusbolik |
🔖 Feature description
As a Typescript user, it would be nice to init a function with a typescript support so we can provide type safety for our appwrite functions.
When we do
appwrite init function
, add an option to initialize with Typescript.🎤 Pitch
For all TS users, I guess a typescript support for introducing types and making cloud function error-free regarding types is pretty much desired.
Support for both require and import should be there.
TS files could live in
dev
folder, for example.Npm scripts would be
devDependencies in package.json
Some basic tsconfig.json example
👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: