Closed chriseppstein closed 4 years ago
This seems roughly the same as what is described in https://github.com/stefanpenner/fs-tree-diff/issues/93 right?
Yeah. Same thing. I think it's fine to publish *.ts
files, but they just need to be in a different directory.
- Change the directory layout; keep sourcemaps enabled and keep *.ts in the package.json.
This is unfortunate, but seems like the most pragmatic approach
Typescript is picking up the
.ts
files in the package instead of the.d.ts
files because they're all in the same directory together. This causes the packages that don't have types to become errors in projects that havenoImplicitAny
set totrue
(The rules in a.d.ts
file are different with respect tonoImplicitAny
- it's not enforced there).I know you don't like it, but it seems like the official recommendation from the typescript maintainers is that either we don't ship
.ts
files or we ship the compiled output from a different directory than the sources.The problem with not shipping the
.ts
files is that sourcemaps won't work right especially withdefinitionSourcemaps
enabled -- even if definition sourcemaps supported inline source maps, it wouldn't work correctly in vscode.So the options appear to be:
1a. Keep the current directory layout; disable sourcemaps; exclude
*.ts
from the package.json. 1b. Same as 1a but with inline sourcemaps + sources inline.*.ts
in the package.json.broccoli-persistent-filter
uses or get official@types
packages for them.My preference is for option 2. Thoughts?