@types/es-abstract
Version:
TypeScript definitions for es-abstract
14 lines (11 loc) • 505 B
TypeScript
import type { PropertyKey } from "../index";
declare function getIteratorMethod<T>(
ES: {
AdvanceStringIndex?(S: string, index: number, unicode: boolean): number;
GetMethod(O: unknown, P: PropertyKey): ((...args: any) => any) | undefined;
IsArray?(O: unknown): boolean;
Type?(O: unknown): string | undefined;
},
iterable: T,
): T extends Iterable<any> ? () => Iterator<T extends Iterable<infer U> ? U : any, any, any> : undefined;
export = getIteratorMethod;