import { StorageDriver } from './interfaces' ; import { Local , S3Storage } from './drivers' ; export class DriverManager { private readonly driverMap : { [ key ] : any ; } = { local : Local , s3 : S3Storage , } ; getDriver ( disk , config ) { const driver = this . driverMap [ config . driver ] ; return new driver ( disk , config ) ; } }