http-errors-enhanced
Version:
Create HTTP errors with additional properties for any framework.
8 lines (7 loc) • 473 B
TypeScript
export type GenericObject = Record<string, any>;
export type NodeError = NodeJS.ErrnoException;
export declare function pascalCase(original: string): string;
export declare function upperFirst(original: string): string;
export declare function lowerFirst(original: string): string;
export declare function addAdditionalProperties(target: GenericObject, source: GenericObject): void;
export declare function serializeError(error: Error, omitStack?: boolean): GenericObject;