AK-21/Graphite-Industrial-Intelligence
0
1/*! *****************************************************************************2Copyright (c) Microsoft Corporation. All rights reserved.3Licensed under the Apache License, Version 2.0 (the "License"); you may not use4this file except in compliance with the License. You may obtain a copy of the5License at http://www.apache.org/licenses/LICENSE-2.06 7THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY8KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED9WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,10MERCHANTABILITY OR NON-INFRINGEMENT.11 12See the Apache Version 2.0 License for specific language governing permissions13and limitations under the License.14***************************************************************************** */15 16 17/// <reference lib="es2018.asynciterable" />18 19interface AsyncGenerator<T = unknown, TReturn = any, TNext = any> extends AsyncIteratorObject<T, TReturn, TNext> {20 // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.21 next(...[value]: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;22 return(value: TReturn | PromiseLike<TReturn>): Promise<IteratorResult<T, TReturn>>;23 throw(e: any): Promise<IteratorResult<T, TReturn>>;24 [Symbol.asyncIterator](): AsyncGenerator<T, TReturn, TNext>;25}26 27interface AsyncGeneratorFunction {28 /**29 * Creates a new AsyncGenerator object.30 * @param args A list of arguments the function accepts.31 */32 new (...args: any[]): AsyncGenerator;33 /**34 * Creates a new AsyncGenerator object.35 * @param args A list of arguments the function accepts.36 */37 (...args: any[]): AsyncGenerator;38 /**39 * The length of the arguments.40 */41 readonly length: number;42 /**43 * Returns the name of the function.44 */45 readonly name: string;46 /**47 * A reference to the prototype.48 */49 readonly prototype: AsyncGenerator;50}51 52interface AsyncGeneratorFunctionConstructor {53 /**54 * Creates a new AsyncGenerator function.55 * @param args A list of arguments the function accepts.56 */57 new (...args: string[]): AsyncGeneratorFunction;58 /**59 * Creates a new AsyncGenerator function.60 * @param args A list of arguments the function accepts.61 */62 (...args: string[]): AsyncGeneratorFunction;63 /**64 * The length of the arguments.65 */66 readonly length: number;67 /**68 * Returns the name of the function.69 */70 readonly name: string;71 /**72 * A reference to the prototype.73 */74 readonly prototype: AsyncGeneratorFunction;75}76 