@@ -88,77 +88,57 @@ Defined in: node_modules/.pnpm/typescript\@5.7.3/node_modules/typescript/lib/lib
8888
8989---
9090
91- ### stackTraceLimit
91+ ### prepareStackTrace()?
9292
93- > ` static ` ** stackTraceLimit ** : ` number `
93+ > ` static ` ` optional ` ** prepareStackTrace ** : ( ` err ` , ` stackTraces ` ) => ` any `
9494
95- Defined in: node_modules/.pnpm/@types +node\@ 22.16.4 /node_modules/@types/node /globals.d.ts:161
95+ Defined in: node_modules/.pnpm/@types +node\@ 22.13.5 /node_modules/@types/node /globals.d.ts:143
9696
97- The ` Error.stackTraceLimit ` property specifies the number of stack frames
98- collected by a stack trace (whether generated by ` new Error().stack ` or
99- ` Error.captureStackTrace(obj) ` ).
97+ Optional override for formatting stack traces
10098
101- The default value is ` 10 ` but may be set to any valid JavaScript number. Changes
102- will affect any stack trace captured _ after_ the value has been changed.
99+ #### Parameters
103100
104- If set to a non-number value, or set to a negative number, stack traces will
105- not capture any frames.
101+ ##### err
106102
107- #### Inherited from
103+ ` Error `
108104
109- ` Error.stackTraceLimit `
105+ ##### stackTraces
110106
111- ## Methods
107+ ` CallSite ` \[ ]
112108
113- ### captureStackTrace()
109+ #### Returns
114110
115- > ` static ` ** captureStackTrace ** ( ` targetObject ` , ` constructorOpt ` ?): ` void `
111+ ` any `
116112
117- Defined in: node_modules/.pnpm/ @ types +node \@ 22.16.4/node_modules/ @ types/node /globals.d.ts:145
113+ #### See
118114
119- Creates a ` .stack ` property on ` targetObject ` , which when accessed returns
120- a string representing the location in the code at which
121- ` Error.captureStackTrace() ` was called.
115+ < https://v8.dev/docs/stack-trace-api#customizing-stack-traces >
116+
117+ #### Inherited from
118+
119+ ` Error.prepareStackTrace `
120+
121+ ---
122122
123- ``` js
124- const myObject = {};
125- Error .captureStackTrace (myObject);
126- myObject .stack ; // Similar to `new Error().stack`
127- ```
123+ ### stackTraceLimit
128124
129- The first line of the trace will be prefixed with
130- ` ${myObject.name}: ${myObject.message} ` .
125+ > ` static ` ** stackTraceLimit** : ` number `
131126
132- The optional ` constructorOpt ` argument accepts a function. If given, all frames
133- above ` constructorOpt ` , including ` constructorOpt ` , will be omitted from the
134- generated stack trace.
127+ Defined in: node_modules/.pnpm/@types +node\@ 22.13.5/node_modules/@types/node /globals.d.ts:145
135128
136- The ` constructorOpt ` argument is useful for hiding implementation
137- details of error generation from the user. For instance:
129+ #### Inherited from
138130
139- ``` js
140- function a () {
141- b ();
142- }
131+ ` Error.stackTraceLimit `
143132
144- function b () {
145- c ();
146- }
133+ ## Methods
147134
148- function c () {
149- // Create an error without stack trace to avoid calculating the stack trace twice.
150- const { stackTraceLimit } = Error ;
151- Error .stackTraceLimit = 0 ;
152- const error = new Error ();
153- Error .stackTraceLimit = stackTraceLimit;
135+ ### captureStackTrace()
154136
155- // Capture the stack trace above function b
156- Error .captureStackTrace (error, b); // Neither function c, nor b is included in the stack trace
157- throw error;
158- }
137+ > ` static ` ** captureStackTrace** (` targetObject ` , ` constructorOpt ` ?): ` void `
159138
160- a ();
161- ```
139+ Defined in: node_modules/.pnpm/@types +node\@ 22.13.5/node_modules/@types/node /globals.d.ts:136
140+
141+ Create .stack property on a target object
162142
163143#### Parameters
164144
@@ -177,33 +157,3 @@ a();
177157#### Inherited from
178158
179159` Error.captureStackTrace `
180-
181- ---
182-
183- ### prepareStackTrace()
184-
185- > ` static ` ** prepareStackTrace** (` err ` , ` stackTraces ` ): ` any `
186-
187- Defined in: node_modules/.pnpm/@types +node\@ 22.16.4/node_modules/@types/node /globals.d.ts:149
188-
189- #### Parameters
190-
191- ##### err
192-
193- ` Error `
194-
195- ##### stackTraces
196-
197- ` CallSite ` \[ ]
198-
199- #### Returns
200-
201- ` any `
202-
203- #### See
204-
205- < https://v8.dev/docs/stack-trace-api#customizing-stack-traces >
206-
207- #### Inherited from
208-
209- ` Error.prepareStackTrace `
0 commit comments