# @types/stack-mapper

> TypeScript definitions for stack-mapper

Latest version **0.2.31** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/stack-mapper
pnpm add @types/stack-mapper
yarn add @types/stack-mapper
bun add @types/stack-mapper
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.2.31 |
| Published | 2023-11-07 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51443 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/stack-mapper
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stack-mapper
- npm.io page: https://npm.io/package/@types/stack-mapper

## Recent versions

- 0.2.31 (latest) — 2023-11-07
- 0.2.28 (ts2.0) — 2016-09-19
- 0.2.30 — 2023-10-18
- 0.2.29 — 2023-09-25
- 0.2.27 — 2016-07-14
- 0.2.26-alpha — 2016-07-08
- 0.2.25-alpha — 2016-07-04
- 0.2.24-alpha — 2016-07-02
- 0.2.23-alpha — 2016-07-02
- 0.2.22-alpha — 2016-07-01
- 0.2.21-alpha — 2016-05-25
- 0.2.20-alpha — 2016-05-20
- 0.2.15-alpha — 2016-05-19
- 0.2.14-alpha — 2016-05-17

## README

# Installation
> `npm install --save @types/stack-mapper`

# Summary
This package contains type definitions for stack-mapper (https://github.com/thlorenz/stack-mapper).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stack-mapper.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stack-mapper/index.d.ts)
````ts
declare namespace stackMapper {
    export class StackMapper {
        /**
         * Maps the trace statements of the given error stack and replaces locations
         * referencing code in the generated file with the locations inside the original files.
         *
         * @name map
         * @function
         * @param {Array} array of callsite objects (see readme for details about Callsite object)
         * @return {Array.<Object>} info about the error stack with adapted locations, each with the following properties
         *    - filename: original filename
         *    - line: origial line in that filename of the trace
         *    - column: origial column on that line of the trace
         */
        public map(stack: Callsite[]): Callsite[];
    }

    export interface Callsite {
        filename: string;
        line: number;
        column: number;
    }
}

/**
 * Returns a Stackmapper that will use the given source map to map error trace locations.
 *
 * @name stackMapper
 * @function
 * @param {Object} sourcemap source map for the generated file
 * @return {StackMapper} stack mapper for the particular source map
 */
declare function stackMapper(sourcemap: any): stackMapper.StackMapper;

export = stackMapper;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: none

# Credits
These definitions were written by [Rogier Schouten](https://github.com/rogierschouten).

---
_Source: https://npm.io/package/@types/stack-mapper · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
