Pinsave/counterstrike
1
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,10MERCHANTABLITY 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 no-default-lib="true"/>18 19/// <reference lib="es2015.iterable" />20 21interface Generator<T = unknown, TReturn = any, TNext = any> extends IteratorObject<T, TReturn, TNext> {22 // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.23 next(...[value]: [] | [TNext]): IteratorResult<T, TReturn>;24 return(value: TReturn): IteratorResult<T, TReturn>;25 throw(e: any): IteratorResult<T, TReturn>;26 [Symbol.iterator](): Generator<T, TReturn, TNext>;27}28 29interface GeneratorFunction {30 /**31 * Creates a new Generator object.32 * @param args A list of arguments the function accepts.33 */34 new (...args: any[]): Generator;35 /**36 * Creates a new Generator object.37 * @param args A list of arguments the function accepts.38 */39 (...args: any[]): Generator;40 /**41 * The length of the arguments.42 */43 readonly length: number;44 /**45 * Returns the name of the function.46 */47 readonly name: string;48 /**49 * A reference to the prototype.50 */51 readonly prototype: Generator;52}53 54interface GeneratorFunctionConstructor {55 /**56 * Creates a new Generator function.57 * @param args A list of arguments the function accepts.58 */59 new (...args: string[]): GeneratorFunction;60 /**61 * Creates a new Generator function.62 * @param args A list of arguments the function accepts.63 */64 (...args: string[]): GeneratorFunction;65 /**66 * The length of the arguments.67 */68 readonly length: number;69 /**70 * Returns the name of the function.71 */72 readonly name: string;73 /**74 * A reference to the prototype.75 */76 readonly prototype: GeneratorFunction;77}78 