@types/stack-utils
TypeScript definitions for stack-utils
Last updated 4 years ago by types .
MIT · Repository · Original npm
$ cnpm install @types/stack-utils 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/stack-utils

Summary

This package contains type definitions for stack-utils (https://github.com/tapjs/stack-utils#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stack-utils.

index.d.ts

// 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
// TypeScript Version: 2.2

export = StackUtils;

declare class StackUtils {
    static nodeInternals(): RegExp[];
    constructor(options?: StackUtils.Options);
    clean(stack: string | string[]): string;
    capture(limit?: number, startStackFunction?: Function): StackUtils.CallSite[];
    capture(startStackFunction: Function): StackUtils.CallSite[];
    captureString(limit?: number, startStackFunction?: Function): string;
    captureString(startStackFunction: Function): string;
    at(startStackFunction?: Function): StackUtils.CallSiteLike;
    parseLine(line: string): StackUtils.StackLineData | null;
}

declare namespace StackUtils {
    interface Options {
        internals?: RegExp[] | undefined;
        ignoredPackages?: string[] | undefined;
        cwd?: string | undefined;
        wrapCallSite?(callSite: CallSite): CallSite;
    }

    interface CallSite {
        getThis(): object | undefined;
        getTypeName(): string;
        getFunction(): Function | undefined;
        getFunctionName(): string;
        getMethodName(): string | null;
        getFileName(): string | undefined;
        getLineNumber(): number;
        getColumnNumber(): number;
        getEvalOrigin(): CallSite | string;
        isToplevel(): boolean;
        isEval(): boolean;
        isNative(): boolean;
        isConstructor(): boolean;
    }

    interface CallSiteLike extends StackData {
        type?: string | undefined;
    }

    interface StackLineData extends StackData {
        evalLine?: number | undefined;
        evalColumn?: number | undefined;
        evalFile?: string | undefined;
    }

    interface StackData {
        line?: number | undefined;
        column?: number | undefined;
        file?: string | undefined;
        constructor?: boolean | undefined;
        evalOrigin?: string | undefined;
        native?: boolean | undefined;
        function?: string | undefined;
        method?: string | undefined;
    }
}

Additional Details

  • Last updated: Fri, 02 Jul 2021 22:32:52 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by BendingBender.

Current Tags

  • 2.0.1                                ...           latest (4 years ago)
  • 1.0.1                                ...           ts2.2 (8 years ago)
  • 1.0.1                                ...           ts2.3 (8 years ago)
  • 1.0.1                                ...           ts2.4 (8 years ago)
  • 1.0.1                                ...           ts2.5 (8 years ago)
  • 1.0.1                                ...           ts2.6 (8 years ago)
  • 1.0.1                                ...           ts2.7 (8 years ago)
  • 1.0.1                                ...           ts2.8 (8 years ago)
  • 1.0.1                                ...           ts2.9 (8 years ago)
  • 1.0.1                                ...           ts3.0 (8 years ago)
  • 1.0.1                                ...           ts3.1 (8 years ago)
  • 2.0.0                                ...           ts3.2 (5 years ago)
  • 2.0.0                                ...           ts3.3 (5 years ago)
  • 2.0.0                                ...           ts3.4 (5 years ago)
  • 2.0.0                                ...           ts3.5 (5 years ago)
  • 2.0.1                                ...           ts3.6 (4 years ago)
  • 2.0.1                                ...           ts3.7 (4 years ago)
  • 2.0.1                                ...           ts3.8 (4 years ago)
  • 2.0.1                                ...           ts3.9 (4 years ago)
  • 2.0.1                                ...           ts4.0 (4 years ago)
  • 2.0.1                                ...           ts4.8 (4 years ago)
  • 2.0.1                                ...           ts4.9 (4 years ago)

3 Versions

  • 2.0.0                                ...           5 years ago
  • 2.0.1                                ...           4 years ago
  • 1.0.1                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org