/** * Copyright 2021 Insta Industries, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. */ import { Phase } from './api'; import { Completer } from './async-utils'; export interface ClientContext { nextMessageId: number; setTimeout: (hander: TimerHandler, timeout?: number) => any; pendingRequests: Map>; } export declare function getClientContext(): ClientContext; export declare type PostMessage = { method: string; id: number; data: any; }; export declare const ClientExecutionPhase: Phase; /** * Resumes the current task. * * @param ctx The client context. */ export declare function resumeTask(ctx: ClientContext): Promise;