support TypeScript for backend functions
**Is your feature request related to a problem? Please describe.** I use the TypeScript generation features for my front-end client, but am frustrated that any of the Lambda functions I create via `amplify add api` or `amplify add function` must be written in vanilla JavaScript. This also makes it very difficult to share code between the backend and frontend (note that many of the auto-generated files created by `amplify cli` use syntax like `export default blah` that is invalid for use in the backend files). **Describe the solution you'd like** Switch to using `tsc` to compile the files found in `amplify/backend/function/*/src/` so that we can opt-in to type-safety by changing our file extension from `.js` to `.ts` or `.tsx`, similar to how Create React App has handled this in version 2.0.0+. **Describe alternatives you've considered** Alternatively, add (or document) how we can hook into the build process for `amplify/backend/function/*` so we can inject a TypeScript transpilation step ourselves.
Posted by troygoode on Jan 4, 2019, 6:29 AM
Tags
Related issues
- Some good points here, and I definitely hate the "unalive" movement but like someone else said, it has gone beyond self-censorship to in-...
- It’s hard to take the article seriously when there’s no real discussion about how consciousness is defined and it takes Anthropic’s views...
- you know what i hate?
- > I honestly do not understand why any average person would buy anything else than a macbook today.
- Codex App frequently freezes/stutters on Windows 11 Pro despite sufficient system resources
- Add "Basic" and "Standard" plans
Raise real-world problems, find people facing the same issue, and discuss solutions.4,000 issues0 comments
ux (SaaS)
Some good points here, and I definitely hate the "unalive" movement but like someone else said, it has gone beyond self-censorship to in-...
It’s hard to take the article seriously when there’s no real discussion about how consciousness is defined and it takes Anthropic’s views...
you know what i hate?
> I honestly do not understand why any average person would buy anything else than a macbook today.
Codex App frequently freezes/stutters on Windows 11 Pro despite sufficient system resources
Add "Basic" and "Standard" plans
FEATURE: Multi-window support in Claude Code Desktop
Hi HN I built CookPal to solve a small but annoying problem for myself: I kept saving recipes from websites, TikTok, YouTube, and Instag...
support TypeScript for backend functions
**Is your feature request related to a problem? Please describe.** I use the TypeScript generation features for my front-end client, but am frustrated that any of the Lambda functions I create via `amplify add api` or `amplify add function` must be written in vanilla JavaScript. This also makes it very difficult to share code between the backend and frontend (note that many of the auto-generated files created by `amplify cli` use syntax like `export default blah` that is invalid for use in the backend files). **Describe the solution you'd like** Switch to using `tsc` to compile the files found in `amplify/backend/function/*/src/` so that we can opt-in to type-safety by changing our file extension from `.js` to `.ts` or `.tsx`, similar to how Create React App has handled this in version 2.0.0+. **Describe alternatives you've considered** Alternatively, add (or document) how we can hook into the build process for `amplify/backend/function/*` so we can inject a TypeScript transpilation step ourselves.
Comments (0)
No comments yet. Start the discussion.