greybel-interpreter 1.2.3 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/handler/output.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export declare abstract class OutputHandler {
|
|
2
2
|
abstract print(message: string): void;
|
|
3
|
+
abstract progress(timeout: number): Promise<void>;
|
|
3
4
|
}
|
|
4
5
|
export declare class DefaultOutputHandler extends OutputHandler {
|
|
5
6
|
print(message: string): void;
|
|
7
|
+
progress(timeout: number): Promise<void>;
|
|
6
8
|
}
|
package/dist/handler/output.js
CHANGED
|
@@ -30,6 +30,11 @@ var DefaultOutputHandler = /** @class */ (function (_super) {
|
|
|
30
30
|
DefaultOutputHandler.prototype.print = function (message) {
|
|
31
31
|
console.log(message);
|
|
32
32
|
};
|
|
33
|
+
DefaultOutputHandler.prototype.progress = function (timeout) {
|
|
34
|
+
return new Promise(function (resolve, _reject) {
|
|
35
|
+
setTimeout(resolve, timeout);
|
|
36
|
+
});
|
|
37
|
+
};
|
|
33
38
|
return DefaultOutputHandler;
|
|
34
39
|
}(OutputHandler));
|
|
35
40
|
exports.DefaultOutputHandler = DefaultOutputHandler;
|