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="es2015.iterable" />18 19interface Generator<T = unknown, TReturn = any, TNext = any> extends IteratorObject<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]): IteratorResult<T, TReturn>;22 return(value: TReturn): IteratorResult<T, TReturn>;23 throw(e: any): IteratorResult<T, TReturn>;24 [Symbol.iterator](): Generator<T, TReturn, TNext>;25}26 27interface GeneratorFunction {28 /**29 * Creates a new Generator object.30 * @param args A list of arguments the function accepts.31 */32 new (...args: any[]): Generator;33 /**34 * Creates a new Generator object.35 * @param args A list of arguments the function accepts.36 */37 (...args: any[]): Generator;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: Generator;50}51 52interface GeneratorFunctionConstructor {53 /**54 * Creates a new Generator function.55 * @param args A list of arguments the function accepts.56 */57 new (...args: string[]): GeneratorFunction;58 /**59 * Creates a new Generator function.60 * @param args A list of arguments the function accepts.61 */62 (...args: string[]): GeneratorFunction;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: GeneratorFunction;75}76 