lib declaration
lib tsconfig emitted
When specifying "lib": ["es2017.sharedmemory"],
in tsconfig.json
, I expected the output declaration files to include a reference directive to the lib, for example, /// <reference lib="es2017.sharedmemory"/>
. Not doing so means that if I publish a package to npm that uses the SharedArrayBuffer
type, the consumer will have to specify "lib": ["es2017.sharedmemory"],
in their tsconfig.json
too. This is super leaky as the original package could be used many levels deep and the requirement leaks to the top. This makes it unfeasible to use any kind of extra lib
in a reusable package.
Relevant issue: sindresorhus/is#51
My current workaround is to manually add the reference directives (which is now possible in TS 3.1.1, thanks to #26497), but this doesn't scale if the package has many files.
Use CasesBeing able to use types for modern features without the consumer having to know what I'm using internally.
Examples ChecklistMy suggestion meets these guidelines:
SamVerschueren and ibezkrovnyi
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4