How to make your own npm package with Typescript .d.ts extension

Photo by Roman Synkevych on Unsplash
The structure
src folder
checkIfNoSameElementExistInArray.ts
tsconfig.json
dist
checkIfNoSameElementExistInArray.js
checkIfNoSameElementExistInArray.d.ts
node_modules/
.idea
test
yarn-error.log
node_modules/
.idea
test
src
tsconfig.json
tslint.json
.prettierrc
yarn-error.log
yarn-publish

A Certified Public Accountant / Hobbyist-but-serious programmer specializing Python, ReactJs, Blockchain / anarchist / Libertarian / Would-be digital nomad

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store