Expose TS types from the main export
See original GitHub issueFeature Request
Hello 👋,
Since an update from v2 to v3, the type, the following does not work anymore:
import * as mmd from 'music-metadata';
const test: mmd.IAudioMetadata = { ... }; // IAudioMetadata is not defined...
I managed to fix it by importing it with import { IAudioMetadata } from 'music-metadata/lib/type';
, but it kind of triggers my OCD 😄
Could we imagine putting the types back (or at least exporting them) to index.d.ts
?
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Documentation - Modules - TypeScript
Any declaration (such as a variable, function, class, type alias, or interface) can be exported by adding the export keyword. StringValidator.ts. ts. export...
Read more >How to export types in a TypeScript npm module
Without declaration files you can develop a package in TypeScript, compile it and expose it to other users as JavaScript code.
Read more >TypeScript: exposing module types in the global context and ...
MyLib.imports.ts import MyClassFromModule from 'moduleA' declare global { namespace MyLib { export type MyClass = MyClassFromModule; export ...
Read more >[request] allow `export type * from` · Issue #37238 - GitHub
I just stumbled upon this. ... When publishing, we strip away TS types and compile to CJS. The types-only files becomes an empty...
Read more >TypeScript library tips: Rollup your types! | by Martin Hochel
- On the left side, we have 3 TypeScript files, amongst which logger.ts contains private API parts that are not exposed via barrel...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
IPicture added in v3.5.3
🎉