Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript Types #31

Open
Dianoga opened this issue Jul 22, 2021 · 0 comments
Open

Typescript Types #31

Dianoga opened this issue Jul 22, 2021 · 0 comments

Comments

@Dianoga
Copy link

Dianoga commented Jul 22, 2021

If it's useful to anyone here is an initial pass at types for this project.

declare module 'ffmetadata' {
	function read(path: string, cb: (err: Error, data: any) => void): void;

	function read(
		path: string,
		options: { dryRun?: boolean; coverPath?: string },
		cb: (err: Error, data: any) => void
	): void;

	function write(
		path: string,
		data: Record<string, unknown>,
		cb: (err: Error) => void
	): void;

	function write(
		path: string,
		data: Record<string, unknown>,
		options: {
			attachments?: string[];
			dryRun?: boolean;
			coverPath?: string;
			id3v1?: boolean;
			'id3v2.3'?: boolean;
		},

		cb: (err: Error) => void
	): void;

	function setFfmpegPath(path: string): void;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant