Skip to content

Commit 321f101

Browse files
authored
merge: v1.4.3 (#58)
issues: * merge: v1.4.3 (#57) commits: * chore: upgrade dependencies (#56) (ac41f70)
2 parents dda9069 + ac41f70 commit 321f101

File tree

7 files changed

+1714
-1929
lines changed

7 files changed

+1714
-1929
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ import {
6565
```typescript
6666
import type {
6767
CallSite, // NodeJS.CallSite
68+
Func, // (...args: any[]) => any
6869
Options, // @mnrendra/stack-trace options
6970
SkippedStacks, // @mnrendra/validate-skipped-stacks input
7071
ValidSkippedStacks // @mnrendra/validate-skipped-stacks output

package-lock.json

Lines changed: 1699 additions & 1922 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export {
88

99
export type {
1010
CallSite,
11+
Func,
1112
Options
1213
} from './types'
1314

src/main.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import type { CallSite, Options } from './types'
1+
import type { CallSite, Func, Options } from './types'
22

33
import { createTarget } from './utils'
44

55
/**
66
* A utility to enable stack tracing of the `NodeJs.CallSite` object, allowing
77
* dynamic tracing of invocations.
88
*
9-
* @param {Function|null} [targetFunction] - An optional function to serve as
10-
* the target.
9+
* @param {Func|null} [targetFunction] - An optional function to serve as the
10+
* target.
1111
* @param {Options} [options] - An optional set of options to configure the
1212
* output.
1313
*
@@ -16,7 +16,7 @@ import { createTarget } from './utils'
1616
* @see https://github.com/mnrendra/stack-trace#readme
1717
*/
1818
const main = (
19-
targetFunction?: Function | null,
19+
targetFunction?: Func | null,
2020
{
2121
limit = 10
2222
}: Options = {

src/types/Func.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export type Func = (...args: any[]) => any

src/types/Options.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@ export interface Options {
22
/**
33
* The `Error.stackTraceLimit` property specifies the number of stack frames
44
* collected by a stack trace.
5-
*
6-
* The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.
75
*
8-
* If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
6+
* The default value is `10` but may be set to any valid JavaScript number.
7+
* Changes will affect any stack trace captured after the value has been
8+
* changed.
9+
*
10+
* If set to a non-number value, or set to a negative number, stack traces
11+
* will not capture any frames.
912
*
1013
* @default 10
1114
*

src/types/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import type { CallSite } from './CallSite'
2+
import type { Func } from './Func'
23
import type { Options } from './Options'
34
import type { Target } from './Target'
45

56
export type {
67
CallSite,
8+
Func,
79
Options,
810
Target
911
}

0 commit comments

Comments
 (0)