1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
import * as videoTranscoder from './video-transcoder' export interface JobHandler<T> { process (data: object): T onError (err: Error, jobId: number) onSuccess (jobId: number, jobResult: T) } const jobHandlers: { [ handlerName: string ]: JobHandler<any> } = { videoTranscoder } export { jobHandlers }