How to use the @zowe/imperative.TaskProgress.ONE_HUNDRED_PERCENT function in @zowe/imperative

To help you get started, we’ve selected a few @zowe/imperative examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github IBM / zowe-cli-cics-deploy-plugin / src / api / BundlePush / SubtaskWithStatus.ts View on Github external
constructor(parent: ITaskWithStatus, ticks: number) {
        this.parent = parent;
        this.ticks = ticks;
        this.percentCompleteInternal = 0;
        if (this.ticks < 0 || this.ticks > TaskProgress.ONE_HUNDRED_PERCENT) {
            throw new ImperativeError({msg: "Ticks must be between 0 and 100"});
        }
    }
github IBM / zowe-cli-cics-deploy-plugin / src / api / BundlePush / SubtaskWithStatus.ts View on Github external
public set percentComplete(percentComplete: number) {
        const delta = percentComplete - this.percentCompleteInternal;
        this.percentCompleteInternal = percentComplete;
        this.parent.percentComplete = this.parent.percentComplete + delta * (this.ticks / TaskProgress.ONE_HUNDRED_PERCENT);
    }