interface ErrorConstructor Methods 🔗 captureStackTrace(error: Object, constructor?: Function): void See https://v8.dev/docs/stack-trace-api#stack-trace-collection-for-custom-exceptions.