lwc
lwc copied to clipboard
Clarification on SF CLI use limitation with TypeScript
What does the limitation regarding using Salesforce CLI with TypeScript for LWC development mean in practice? Does this mean the source cannot be deployed to org?
The guide is here: https://developer.salesforce.com/docs/platform/lwc/guide/ts.html
TypeScript Limitations
For now, LWC support for TypeScript excludes these use cases.
- Using TypeScript with the Salesforce CLI
- Source map debugging using TypeScript
- Non-Salesforce types
- Type definitions for custom Salesforce fields and objects
Does this mean the source cannot be deployed to org?
That's correct. You currently can only deploy JavaScript to your org, so you must compile any TypeScript code before deploying.