MCPcopy
hub / github.com/RocketChat/Rocket.Chat / mapAsync

Method mapAsync

apps/meteor/client/meteor/minimongo/Cursor.ts:706–715  ·  view source on GitHub ↗
(
		callback: TIterationCallback,
		thisArg: ThisParameterType<TIterationCallback>,
	)

Source from the content-addressed store, hash-verified

704 }
705
706 mapAsync<TIterationCallback extends (doc: DispatchTransform<TOptions['transform'], T>, index: number, cursor: this) => any>(
707 callback: TIterationCallback,
708 thisArg: ThisParameterType<TIterationCallback>,
709 ): Promise<ReturnType<TIterationCallback>[]> {
710 try {
711 return Promise.resolve(this.map(callback, thisArg));
712 } catch (error) {
713 return Promise.reject(error);
714 }
715 }
716
717 private _observeCallbacksAreOrdered(callbacks: ObserveOptions<T>) {
718 if (callbacks.added && callbacks.addedAt) {

Callers

nothing calls this directly

Calls 2

mapMethod · 0.95
rejectMethod · 0.65

Tested by

no test coverage detected