Commit 5255471
Add TypeScript declaration files to published package (#43)
* Add TypeScript declaration files to published package
PROBLEM:
The package has TypeScript source files but does not publish .d.ts
declaration files to npm. Users get no type information when installing
from npm.
SOLUTION:
1. Add 'typings' field to package.json pointing to dist/index.d.ts
2. Add copyTypes script to package-scripts.js to generate declarations
3. Include copyTypes in build.default series
PATTERN:
Matches the approach used in final-form-calculate, final-form-submit-listener,
and other packages in the final-form ecosystem.
Fixes: Issue #47 pattern (TypeScript declarations not in published package)
* Fix copyTypes script description - it generates, not copies
---------
Co-authored-by: Erik Rasmussen <erik@mini.local>1 parent f721d73 commit 5255471
2 files changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
0 commit comments