Skip to content

Include type declarations in the npm packge #14

@lantw44

Description

@lantw44

Since this package is written in TypeScript, it will be nice if you can provide .d.ts files in the published npm package to allow other projects to reuse your type declarations. It should be as simple as adding a single line to tsconfig.json:

diff a/tsconfig.json b/tsconfig.json
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -7,6 +7,7 @@
         "target": "es6",
         "module": "commonjs",
         "noImplicitAny": true,
+        "declaration": true,
         "moduleResolution": "node",
         "baseUrl": "./",
         "paths": {

This package does not build on my machine, and I cannot test if the patch works for you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions