mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
stack-utils: Add ignoredPackages to options and bump version (#46815)
* stack-utils: Add `ignoredPackages` to options * Update index.d.ts * Update stack-utils-tests.ts
This commit is contained in:
parent
3900b3a45d
commit
eaf94a92b9
3
types/stack-utils/index.d.ts
vendored
3
types/stack-utils/index.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
// Type definitions for stack-utils 1.0
|
||||
// Type definitions for stack-utils 2.0
|
||||
// Project: https://github.com/tapjs/stack-utils#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@ -21,6 +21,7 @@ declare class StackUtils {
|
||||
declare namespace StackUtils {
|
||||
interface Options {
|
||||
internals?: RegExp[];
|
||||
ignoredPackages?: string[];
|
||||
cwd?: string;
|
||||
wrapCallSite?(callSite: CallSite): CallSite;
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/// <reference types="node" />
|
||||
import StackUtils = require('stack-utils');
|
||||
|
||||
const stack = new StackUtils({cwd: process.cwd(), internals: StackUtils.nodeInternals()});
|
||||
const stack = new StackUtils({cwd: process.cwd(), internals: StackUtils.nodeInternals(), ignoredPackages: ["foobar"]});
|
||||
const stackStr = new Error().stack;
|
||||
|
||||
if (stackStr) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user