This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { EventEmitter } from 'events'; | |
| import { getInstance } from './core-util/mongo'; | |
| import { ChangeEvent, ChangeEventCR, ChangeEventDelete, ChangeEventUpdate, ChangeStream, ObjectId } from 'mongodb'; | |
| type ChangeListenerFunction<T> = (payload: T) => void; | |
| interface User { | |
| address: { | |
| city: string | |
| country: string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // === Parameter definition === | |
| interface RouteParameterBase { | |
| description?: string; | |
| nullable?: boolean; | |
| required?: boolean; | |
| } | |
| interface BooleanRouteParameter extends RouteParameterBase { | |
| type: 'boolean'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #f4f6f9,#e0e5ee,#d8edff,#0070d2,#e0e5ee,#16325c,#4bca81,#000000,#e0e5ee,#16325c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Allows for sequentially running batches of async operations. | |
| * @param {number} concurrency The maximum number of operations to run concurrently. | |
| */ | |
| export function batch(concurrency: number) { | |
| return async function <TElement, TResult>(xs: Array<TElement>, handler: (x: TElement) => TResult): Promise<Array<TResult>> { | |
| const results: Array<TResult> = []; | |
| const batches = Array.from({ length: Math.ceil(xs.length / concurrency) }, (_, i) => i) | |
| for await (const batchNumber of batches) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "accentFromPage": false, | |
| "accentOnWindow": true, | |
| "accentSaturationLimit": 1, | |
| "alpha": 1, | |
| "backgroundImage": "", | |
| "backgroundPosition": "stretch", | |
| "blur": 0, | |
| "colorAccentBg": "#d8edff", | |
| "colorBg": "#f4f6f9", |