mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
[ffmpeg-concat] Create type definition (#43945)
* Create ffmpeg-concat type definition * Export syntax * Transition.params is optional
This commit is contained in:
parent
3ce60aa3be
commit
98d8f8e220
29
types/ffmpeg-concat/ffmpeg-concat-tests.ts
Normal file
29
types/ffmpeg-concat/ffmpeg-concat-tests.ts
Normal file
@ -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: ['', ''],
|
||||
});
|
||||
27
types/ffmpeg-concat/index.d.ts
vendored
Normal file
27
types/ffmpeg-concat/index.d.ts
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
// Type definitions for ffmpeg-concat 1.1
|
||||
// Project: https://github.com/transitive-bullshit/ffmpeg-concat
|
||||
// Definitions by: Weslen Nascimento <https://github.com/weslenng>
|
||||
// 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<Transition>;
|
||||
videos: ReadonlyArray<string>;
|
||||
}
|
||||
|
||||
declare function concat(concatOptions: ConcatOptions): Promise<void>;
|
||||
|
||||
export = concat;
|
||||
17
types/ffmpeg-concat/tsconfig.json
Normal file
17
types/ffmpeg-concat/tsconfig.json
Normal file
@ -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"]
|
||||
}
|
||||
1
types/ffmpeg-concat/tslint.json
Normal file
1
types/ffmpeg-concat/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user