UNPKG

1.03 kBSource Map (JSON)View Raw
1{"version":3,"sources":["asynciterable/empty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,kBAAmB,SAAQ,cAAqB;IACpD,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,MAAoB;QAChD,cAAc,CAAC,MAAM,CAAC,CAAC;IACzB,CAAC;CACF;AAED;;;;;;GAMG;AACH,MAAM,UAAU,KAAK;IACnB,OAAO,IAAI,kBAAkB,EAAE,CAAC;AAClC,CAAC","file":"empty.js","sourcesContent":["import { AsyncIterableX } from './asynciterablex';\nimport { throwIfAborted } from '../aborterror';\n\nclass EmptyAsyncIterable extends AsyncIterableX<never> {\n async *[Symbol.asyncIterator](signal?: AbortSignal): AsyncIterator<never> {\n throwIfAborted(signal);\n }\n}\n\n/**\n * Returns an empty async-iterable sequence.\n *\n * @export\n * @template TSource The type used for the async-iterable type parameter of the resulting sequence.\n * @returns {AsyncIterableX<never>} An async-iterable sequence with no elements.\n */\nexport function empty(): AsyncIterableX<never> {\n return new EmptyAsyncIterable();\n}\n"]}
\No newline at end of file