import { cancelLastOperationMessage , RpcMessageType } from '../protocol/rpc_messages' ; import { BaseRequest } from './base_request' ; export class CancelLastOperationRequest extends BaseRequest < void , void > { dispatchInternal ( ) { this . registerHandler ( RpcMessageType . cancelLastOperationResult , ( ) => this . handleResult ( ) ) ; this . channel . send ( cancelLastOperationMessage ( this . id ) ) ; } private handleResult ( ) { this . resolve ( ) ; this . dispose ( ) ; } }