refactoring to promises

This commit is contained in:
alecmerdler 2017-03-08 11:43:53 -08:00
parent 390e389027
commit 85441c8459
9 changed files with 191 additions and 28 deletions

View file

@ -5,8 +5,8 @@
export abstract class DockerfileService {
/**
* Retrieve Dockerfile from given archive file.
* @param file File containing Dockerfile.
* Retrieve Dockerfile from given file.
* @param file Dockerfile or archive file containing Dockerfile.
* @param success Success callback with retrieved Dockerfile as parameter.
* @param failure Failure callback with failure message as parameter.
*/
@ -14,6 +14,11 @@ export abstract class DockerfileService {
success: (dockerfile: DockerfileInfo) => void,
failure: (error: ErrorEvent | string) => void): void;
/**
* Retrieve Dockerfile from given file.
* @param file Dockerfile or archive file containing Dockerfile.
* @return promise Promise resolving to new DockerfileInfo instance or rejecting to error message.
*/
public abstract extractDockerfile(file: any): Promise<DockerfileInfo | string>;
}