I am trying to learn
npm and TypeScript. My aim is to create a TypeScript package called
scrape-jobs in one project and use it in another. I want to keep my type definitions separate from my function definitions (in the source code) if at all possible.
After building my project, my
scrape-jobs folder structure is as follows:
| .eslintignore | .eslintrc | .prettierrc | package-lock.json | package.json | tsconfig.json | +---build | functions.d.ts | functions.d.ts.map | functions.js | functions.js.map | types.d.ts | types.d.ts.map | types.js | types.js.map | +---src | functions.ts | types.ts
As shown, the declaration files for my functions and types are now in two files:
types.d.ts. However, the
"types" property in
package.json only allows for a single value, so how can I specify both
*.d.ts files to the consuming project?