##// END OF EJS Templates
spelling fixes
spelling fixes

File last commit:

r13:745612edbd74 propose cancellat...
r19:9d394c2adc2b propose cancellat...
Show More
AsyncComponent.ts
16 lines | 531 B | video/mp2t | TypeScriptLexer
cin
refactoring, all common interfaces placed to core/interfaces.ts...
r13 import { Cancellation } from "../Cancellation";
import { IAsyncComponent, ICancellation } from "../interfaces";
cin
Async operation cancellation proposal...
r9
cin
refactoring, all common interfaces placed to core/interfaces.ts...
r13 export class AsyncComponent implements IAsyncComponent {
_completion: Promise<void> = Promise.resolve();
cin
Async operation cancellation proposal...
r9
getCompletion() { return this._completion };
cin
refactoring, all common interfaces placed to core/interfaces.ts...
r13 runOperation(op: (ct: ICancellation) => any, ct: ICancellation = Cancellation.none) {
// TODO create cancellation source here
async function guard() {
await op(ct);
}
cin
Async operation cancellation proposal...
r9
cin
refactoring, all common interfaces placed to core/interfaces.ts...
r13 return this._completion = guard();
cin
Async operation cancellation proposal...
r9 }
}