import { LongRunningOperation , LroResponse } from "@azure/core-lro" ; export class LroImpl < T > implements LongRunningOperation < T > { constructor ( private sendOperationFn , private args , private spec , public requestPath = spec . path ! , public requestMethod = spec . httpMethod ) { } public async sendInitialRequest ( ) { return this . sendOperationFn ( this . args , this . spec ) ; } public async sendPollRequest ( path ) { const { requestBody , ... restSpec } = this . spec ; return this . sendOperationFn ( this . args , { ... restSpec , path , httpMethod : "GET" } ) ; } }