A template to use for Leetcode Typescript grinding.
For Typescript
- Google's Typescript style guide
- ts-node with swc for 10x speed
- @swc/jest for 10x speed
For Leetcode
Official doc for JavaScript/Typescript runtime environment
@datastructures-js/priority-queuelibrary installed with typings!@datastructures-js/queuelibrary installedlodash.jsinstalled- Script to generate a custom test case and copy it to clipboard
For Developer Experience
.editorconfigand prettier config setup- eslint auto fix and auto import organizing
- Debugging in vscode
Development
- Install dependencies
$ npm i-
Edit
src/index.ts -
Run
$ npm run startTest
$ npm run testTest Generation
$ npm run testgenDebug
- Click "Run and Debug" menu in vscode
- Select "Debug Jest" option, or "Debug Jest Win" if you're a windows user
- Click "Start Debugging" button or hit "F5" key