@nestjs/core
Version:
The core of NestJS, a TypeScript framework for Node.js backends: modules, dependency injection and the request pipeline, on Express, Fastify or node:http.
10 lines (9 loc) • 408 B
TypeScript
/**
* Creates an error without capturing a stack trace, for exceptions Nest throws
* itself where the stack would only hold framework frames (e.g. the 404 for an
* unknown route). Capturing it is most of what creating the error costs.
*
* Leaves `Error.stackTraceLimit` alone when it is read-only, since assigning
* it would throw.
*/
export declare function withoutStackTrace<T>(create: () => T): T;