Skip to content

Instantly share code, notes, and snippets.

@sergejbog
sergejbog / commands.shell
Created November 15, 2022 16:08
Making an NPM typescript package #typescript
npm i typescript -D
npx tsc --init --rootDir src --outDir lib --sourceMap --declaration --declarationMap
# when you finish it
# you declare the name in package.json
npm publish
@sergejbog
sergejbog / commands.sh
Last active November 15, 2022 16:16
Install typescript type for node.js functions and objects and other types. #typescript
npm i @types/node
npm i @types/express
@sergejbog
sergejbog / commands.sh
Last active November 15, 2022 16:19
Intro commands for typescript #typescript
npm i typescript ts-node
npx tsc --init --rootdir src --outdir lib
# either do this or do the package.json commands
npx tsc --watch