swagger-typed-express-docs
Version:
Simple express runtime parser and documentation swagger generator with 100% support of Typescript static types
21 lines (20 loc) • 1.1 kB
TypeScript
export declare const mapEntries: <Key extends string | number, V, RetKey extends string | number, RV>(fn: (a: [Key, V]) => [RetKey, RV], obj: Record<Key, V>) => Record<RetKey, RV>;
export declare const isObject: (a: any) => boolean;
export declare const removeFirstSlash: (path: string) => string;
export declare const removeLastSlash: (path: string) => string;
export declare const trimSlash: (path: string) => string;
export declare const mergePaths: (path1: string, path2: string) => string;
export declare const syncAllSettled: <T>(syncFns: (() => T)[]) => PromiseSettledResult<T>[];
export declare const validateUntilFirstSuccess: (validationFns: any[]) => {
status: "rejected";
reasons: any[];
} | {
status: "fulfilled";
data: any;
index: number;
};
export type DeepPartial<T> = T extends (infer Item)[] ? DeepPartial<Item>[] | undefined : T extends Record<string, any> ? {
[P in keyof T]?: DeepPartial<T[P]>;
} : T;
export declare const deepMerge: (target: any, ...sources: any[]) => any;
export declare const notNullable: <T>(x: false | T | null | undefined) => x is T;