Export @ffmpeg/ffmpeg
TS types declared in src/types.ts
#723
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Is your feature request related to a problem? Please describe.
The
@ffmpeg/ffmpeg
package.json declaration file claims that library types are exported atindex.d.ts
:However, in reality, the only type that is exported is the
FFmpeg
class declaration fromclasses.d.ts
.The
FFmpeg
class utilizes TypeScript types such asLogEventCallback
,ProgressEventCallback
,FFMessageLoadConfig
, andFFMessageOptions
, which are declared intypes.ts
.I would like to utilize these types to create a custom wrapper around the
FFmpeg
class. However, currently, it seems impossible to export them.Describe the solution you'd like
I propose exporting all types declared in types.ts at the index.ts root file as follows:
export * from "./classes.js"; + export * from "./types.js";
Describe alternatives you've considered
I attempted to use the
@ffmpeg/types
library, but it mostly contains unrelated or unuseful content that doesn't meet my needs.Additionally, I tried to directly import from the
types.d.ts
file in the dist, but my resolver couldn't locate such a file: