@types/istanbul-lib-instrument

  • Version 1.7.4
  • Published
  • 4.88 kB
  • 3 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: any;

              property opts

              opts: InstrumenterOptions;

                property sourceMap

                sourceMap: any;

                  method instrument

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

                    method instrumentSync

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

                      method lastFileCoverage

                      lastFileCoverage: () => any;

                        method lastSourceMap

                        lastSourceMap: () => any;

                          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 coverageVariable

                                            coverageVariable: string;

                                              property debug

                                              debug: boolean;

                                                property esModules

                                                esModules: boolean;

                                                  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 (3)

                                                                      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>