@types/source-list-map

  • Version 0.1.2
  • Published
  • No dependencies
  • MIT license

Install

npm i @types/source-list-map
yarn add @types/source-list-map
pnpm add @types/source-list-map

Overview

TypeScript definitions for source-list-map

Index

Functions

function fromStringWithSourceMap

fromStringWithSourceMap: (
code: string,
map: {
sources: (string | SourceNode | CodeNode)[];
sourcesContent: string[];
mappings: string;
}
) => SourceListMap;

    Classes

    class CodeNode

    class CodeNode {}

      constructor

      constructor(generatedCode: string);

        property generatedCode

        generatedCode: string;

          method addGeneratedCode

          addGeneratedCode: (generatedCode: string) => void;

            method clone

            clone: () => CodeNode;

              method getGeneratedCode

              getGeneratedCode: () => string;

                method getMappings

                getMappings: (mappingsContext?: MappingsContext) => string;

                  method mapGeneratedCode

                  mapGeneratedCode: (fn: (code: string) => string) => void;

                    class MappingsContext

                    class MappingsContext {}

                      constructor

                      constructor();

                        property currentOriginalLine

                        currentOriginalLine: number;

                          property currentSource

                          currentSource: number;

                            property hasSourceContent

                            hasSourceContent: boolean;

                              property sources

                              sources: string[];

                                property sourcesContent

                                sourcesContent: string[];

                                  method ensureSource

                                  ensureSource: (source: string, originalSource: string) => number;

                                    class SourceListMap

                                    class SourceListMap {}

                                      constructor

                                      constructor(generatedCode: (CodeNode | SourceNode)[]);

                                        constructor

                                        constructor(
                                        generatedCode?: string | SourceListMap | CodeNode | SourceNode,
                                        source?: string,
                                        originalSource?: string
                                        );

                                          property children

                                          children: (CodeNode | SourceNode)[];

                                            method add

                                            add: (
                                            generatedCode: string | CodeNode | SourceNode | SourceListMap,
                                            source?: string,
                                            originalSource?: string
                                            ) => void;

                                              method mapGeneratedCode

                                              mapGeneratedCode: (fn: (code: string) => string) => void;

                                                method prepend

                                                prepend: (
                                                generatedCode: SourceListMap | SourceNode | CodeNode,
                                                source?: string,
                                                originalSource?: string
                                                ) => void;

                                                  method toString

                                                  toString: () => string;

                                                    method toStringWithSourceMap

                                                    toStringWithSourceMap: (options: {
                                                    file: any;
                                                    }) => {
                                                    source: string;
                                                    map: {
                                                    version: number;
                                                    file: any;
                                                    sources: string[];
                                                    sourcesContent: string[];
                                                    mappings: string;
                                                    };
                                                    };

                                                      class SourceNode

                                                      class SourceNode {}

                                                        constructor

                                                        constructor(
                                                        generatedCode: string,
                                                        source: string,
                                                        originalSource: string,
                                                        startingLine?: number
                                                        );

                                                          property generatedCode

                                                          generatedCode: string;

                                                            property originalSource

                                                            originalSource: string;

                                                              property source

                                                              source: string;

                                                                property startingLine

                                                                startingLine: number;

                                                                  method clone

                                                                  clone: () => SourceNode;

                                                                    method getGeneratedCode

                                                                    getGeneratedCode: () => string;

                                                                      method getMappings

                                                                      getMappings: (mappingsContext: MappingsContext) => string;

                                                                        method mapGeneratedCode

                                                                        mapGeneratedCode: (fn: (code: string) => string) => void;

                                                                          Package Files (1)

                                                                          Dependencies (0)

                                                                          No dependencies.

                                                                          Dev Dependencies (0)

                                                                          No dev dependencies.

                                                                          Peer Dependencies (0)

                                                                          No peer dependencies.

                                                                          Badge

                                                                          To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                          You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/source-list-map.

                                                                          • Markdown
                                                                            [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/source-list-map)
                                                                          • HTML
                                                                            <a href="https://www.jsdocs.io/package/@types/source-list-map"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>