@types/istanbul-lib-instrument

  • Version 1.7.8
  • Published
  • 7.26 kB
  • 4 dependencies
  • MIT license

Install

npm i @types/istanbul-lib-instrument
yarn add @types/istanbul-lib-instrument
pnpm add @types/istanbul-lib-instrument

Overview

TypeScript definitions for istanbul-lib-instrument

Index

Functions

function createInstrumenter

createInstrumenter: (options?: Partial<InstrumenterOptions>) => Instrumenter;

    function programVisitor

    programVisitor: (
    types: any,
    sourceFilePath?: string,
    opts?: Partial<VisitorOptions>
    ) => Visitor;

      function readInitialCoverage

      readInitialCoverage: (code: string) => InitialCoverage;

        Classes

        class Instrumenter

        class Instrumenter {}

          constructor

          constructor(options?: Partial<InstrumenterOptions>);

            property fileCoverage

            fileCoverage: FileCoverage;

              property opts

              opts: InstrumenterOptions;

                property sourceMap

                sourceMap: any;

                  method instrument

                  instrument: (
                  code: string,
                  filenameOrCallback: string | InstrumenterCallback,
                  callback?: InstrumenterCallback,
                  inputSourceMap?: RawSourceMap
                  ) => void;

                    method instrumentSync

                    instrumentSync: (
                    code: string,
                    filename: string,
                    inputSourceMap?: RawSourceMap
                    ) => string;

                      method lastFileCoverage

                      lastFileCoverage: () => FileCoverageData;

                        method lastSourceMap

                        lastSourceMap: () => RawSourceMap;

                          method normalizeOpts

                          normalizeOpts: (options?: Partial<InstrumenterOptions>) => InstrumenterOptions;

                            Interfaces

                            interface InitialCoverage

                            interface InitialCoverage {}

                              property coverageData

                              coverageData: any;

                                property gcv

                                gcv: any;

                                  property hash

                                  hash: string;

                                    property path

                                    path: string;

                                      interface InstrumenterOptions

                                      interface InstrumenterOptions {}

                                        property autoWrap

                                        autoWrap: boolean;

                                          property compact

                                          compact: boolean;

                                            property coverageGlobalScope

                                            coverageGlobalScope?: string;

                                              property coverageGlobalScopeFunc

                                              coverageGlobalScopeFunc?: boolean;

                                                property coverageVariable

                                                coverageVariable: string;

                                                  property debug

                                                  debug: boolean;

                                                    property esModules

                                                    esModules: boolean;

                                                      property generatorOpts

                                                      generatorOpts?: GeneratorOptions;

                                                        property ignoreClassMethods

                                                        ignoreClassMethods?: string[];

                                                          property parserPlugins

                                                          parserPlugins?: any[];

                                                            property preserveComments

                                                            preserveComments: boolean;

                                                              property produceSourceMap

                                                              produceSourceMap: boolean;

                                                                method sourceMapUrlCallback

                                                                sourceMapUrlCallback: (filename: string, url: string) => void;

                                                                  interface Visitor

                                                                  interface Visitor {}

                                                                    method enter

                                                                    enter: (path: string) => void;

                                                                      method exit

                                                                      exit: (path: string) => { fileCoverage: FileCoverage; sourceMappingURL: string };

                                                                        interface VisitorOptions

                                                                        interface VisitorOptions {}

                                                                          property coverageVariable

                                                                          coverageVariable: string;

                                                                            property inputSourceMap

                                                                            inputSourceMap: RawSourceMap;

                                                                              Type Aliases

                                                                              type InstrumenterCallback

                                                                              type InstrumenterCallback = (error: Error | null, code: string) => void;

                                                                                Package Files (1)

                                                                                Dependencies (4)

                                                                                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/istanbul-lib-instrument.

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