UNPKG

2.08 kBSource Map (JSON)View Raw
1{"version":3,"sources":["asynciterable/findoptions.ts"],"names":[],"mappings":"","file":"findoptions.js","sourcesContent":["/**\n * A find options property bag with the selector, thisArg for binding and AbortSignal are all optional.\n *\n * @export\n * @interface OptionalFindOptions\n * @template T The type of the elements in the source sequence.\n */\nexport interface OptionalFindOptions<T> {\n /**\n * The optional abort signal to be used for cancelling the sequence at any time.\n *\n * @type {AbortSignal}\n * @memberof OptionalFindOptions\n */\n signal?: AbortSignal;\n /**\n * The optional `this` binding for the predicate function.\n *\n * @type {*}\n * @memberof OptionalFindOptions\n */\n thisArg?: any;\n /**\n * The optional predicate which gives the current value, the current index and abort signal. This function\n * returns either a boolean or a promise containing a boolean whether the condition holds or not.\n *\n * @memberof OptionalFindOptions\n */\n predicate?: (value: T, index: number, signal?: AbortSignal) => boolean | Promise<boolean>;\n}\n\n/**\n * A find options property bag with the selector being required and the thisArg for binding and AbortSignal are all optional.\n *\n * @export\n * @interface FindOptions\n * @template T The type of the elements in the source sequence.\n */\nexport interface FindOptions<T> {\n /**\n * The optional abort signal to be used for cancelling the sequence at any time.\n *\n * @type {AbortSignal}\n * @memberof FindOptions\n */\n signal?: AbortSignal;\n /**\n * The optional `this` binding for the predicate function.\n *\n * @type {*}\n * @memberof FindOptions\n */\n thisArg?: any;\n /**\n * The optional predicate which gives the current value, the current index and abort signal. This function\n * returns either a truthy value or a promise containing a truthy value whether the condition holds or not.\n *\n * @memberof FindOptions\n */\n predicate: (value: T, index: number, signal?: AbortSignal) => boolean | Promise<boolean>;\n}\n"]}
\No newline at end of file