updates umzug types to support custom resolver

This commit is contained in:
Jasper Roloff
2017-10-29 18:58:03 +01:00
parent f7f81bced2
commit cce915c86c

View File

@@ -28,6 +28,16 @@ declare namespace umzug {
*/
wrap?: <T>(fn: T) => T;
/**
* A function that maps a file path to a migration object in the form
* { up: Function, down: Function }. The default for this is to require(...)
* the file as javascript, but you can use this to transpile TypeScript,
* read raw sql etc.
* See https://github.com/sequelize/umzug/tree/master/test/fixtures
* for examples.
*/
customResolver?(path: string): { up: () => Promise<any>, down?: () => Promise<any> };
}
interface JSONStorageOptions {