diff --git a/types/ffmpeg-concat/ffmpeg-concat-tests.ts b/types/ffmpeg-concat/ffmpeg-concat-tests.ts new file mode 100644 index 0000000000..a09ca9d5cb --- /dev/null +++ b/types/ffmpeg-concat/ffmpeg-concat-tests.ts @@ -0,0 +1,29 @@ +import concat from 'ffmpeg-concat'; + +concat({ + audio: '', + cleanupFrames: true, + concurrency: 4, + frameFormat: 'raw', + log: () => {}, + output: '', + tempDir: '', + transition: { + duration: 100, + name: '', + params: { direction: [1, -1] }, + }, + transitions: [ + { + duration: 100, + name: '', + params: { direction: [1, -1] }, + }, + { + duration: 100, + name: '', + params: { direction: [1, -1] }, + }, + ], + videos: ['', ''], +}); diff --git a/types/ffmpeg-concat/index.d.ts b/types/ffmpeg-concat/index.d.ts new file mode 100644 index 0000000000..a0c8ccd5d5 --- /dev/null +++ b/types/ffmpeg-concat/index.d.ts @@ -0,0 +1,27 @@ +// Type definitions for ffmpeg-concat 1.1 +// Project: https://github.com/transitive-bullshit/ffmpeg-concat +// Definitions by: Weslen Nascimento +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface Transition { + duration: number; + name: string; + params?: any; +} + +interface ConcatOptions { + audio?: string; + cleanupFrames?: boolean; + concurrency?: number; + frameFormat?: 'jpg' | 'png' | 'raw'; + log?: (stdout: string) => void; + output: string; + tempDir?: string; + transition?: Transition; + transitions?: ReadonlyArray; + videos: ReadonlyArray; +} + +declare function concat(concatOptions: ConcatOptions): Promise; + +export = concat; diff --git a/types/ffmpeg-concat/tsconfig.json b/types/ffmpeg-concat/tsconfig.json new file mode 100644 index 0000000000..57a69eb800 --- /dev/null +++ b/types/ffmpeg-concat/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": ["index.d.ts", "ffmpeg-concat-tests.ts"] +} diff --git a/types/ffmpeg-concat/tslint.json b/types/ffmpeg-concat/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/ffmpeg-concat/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }