mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 13:00:19 +00:00
umzug being EventEmitter, added appropriate events
This commit is contained in:
Vendored
+9
-3
@@ -1,9 +1,11 @@
|
||||
// Type definitions for Umzug v2.0.1
|
||||
// Type definitions for Umzug v2.1.0
|
||||
// Project: https://github.com/sequelize/umzug
|
||||
// Definitions by: Ivan Drinchev <https://github.com/drinchev>
|
||||
// Margus Lamp <https://github.com/mlamp>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
import { EventEmitter } from 'events';
|
||||
import Sequelize = require("sequelize");
|
||||
|
||||
declare namespace umzug {
|
||||
@@ -169,7 +171,7 @@ declare namespace umzug {
|
||||
file: string;
|
||||
}
|
||||
|
||||
interface Umzug {
|
||||
interface Umzug extends EventEmitter {
|
||||
/**
|
||||
* The execute method is a general purpose function that runs for
|
||||
* every specified migrations the respective function.
|
||||
@@ -200,6 +202,10 @@ declare namespace umzug {
|
||||
down(migrations?: string[]): Promise<Migration[]>;
|
||||
down(options?: DownToOptions | UpDownMigrationsOptions): Promise<Migration[]>;
|
||||
|
||||
on(eventName: 'migrating' | 'reverting' | 'migrated' | 'reverted', cb?: (name: string, migration: string) => void): this;
|
||||
addListener(eventName: 'migrating' | 'reverting' | 'migrated' | 'reverted', cb?: (name: string, migration: string) => void): this;
|
||||
removeListener(eventName: 'migrating' | 'reverting' | 'migrated' | 'reverted', cb?: (name: string, migration: string) => void): this;
|
||||
|
||||
}
|
||||
|
||||
interface UmzugStatic {
|
||||
@@ -207,5 +213,5 @@ declare namespace umzug {
|
||||
}
|
||||
}
|
||||
|
||||
declare var umzug: umzug.UmzugStatic;
|
||||
declare const umzug: umzug.UmzugStatic;
|
||||
export = umzug;
|
||||
|
||||
Reference in New Issue
Block a user