Skip to content

Example demonstrating how typescript can be used in Salesforce Lightning Component Framework

Notifications You must be signed in to change notification settings

ChuckJonas/typescript-belgian-beer-explorer-lightning

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Typescript Belgian Beer Explorer Lightning Components

A port of Belgian Beer Explorer to typescript as a proof of concept.

This is a very primitive setup and just meant to illustrate how typescript could be leveraged in the lightning component framework. Could easily be expanded to work as a DX project to provide a much more robust developer experience.

Dev Setup

  • git clone [this]
  • cd typescript-belgian-beer-explorer-lightning
  • npm install
  • npm install sfdx-cli -g (if you don't have sdfx-cli already installed)
  • in package.json update deploy script with an authed user

Workflow

  • Edit ts files
  • npm run build
  • npm run deploy

See Belgian Beer Explorer instructions for setting up application.

Typings

As of writing this, no typing files were available for the aura API. If you'd like to see salesforce add them, go show support on this issue. I've added a few API types to types.d.ts as well as typed some of the BeerList component.

Note: I haven't actually tested to see if salesforce accepts any of the functional typescript features (things that transpile to code like classes & enums). Type Definitions don't result in any transpiled JS so there should be no issues there.

About

Example demonstrating how typescript can be used in Salesforce Lightning Component Framework

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 52.3%
  • TypeScript 32.3%
  • Apex 15.4%