ts-helpers

  • Version 1.1.2
  • Published
  • No dependencies
  • MIT license

Install

npm i ts-helpers
yarn add ts-helpers
pnpm add ts-helpers

Overview

Typescript helpers for compiling typescript while specifying `--noEmitHelpers` within your `tsconfig.json`. Cross platform ( Node/Browser/WebWorker )

Index

Namespaces

namespace chai

module 'chai' {}

    variable chai

    var chai: Chai.ChaiStatic;

      variable chai

      var chai: Chai.ChaiStatic;

        namespace mocha

        module 'mocha' {}

          class Mocha

          class Mocha {}

            constructor

            constructor(options?: {
            grep?: RegExp;
            ui?: string;
            reporter?: string;
            timeout?: number;
            bail?: boolean;
            });

              method addFile

              addFile: (file: string) => Mocha;

                method asyncOnly

                asyncOnly: (value: boolean) => Mocha;

                  method bail

                  bail: (value?: boolean) => Mocha;

                    method checkLeaks

                    checkLeaks: () => Mocha;

                      method enableTimeouts

                      enableTimeouts: (value: boolean) => Mocha;

                        method globals

                        globals: { (value: string): Mocha; (values: string[]): Mocha };

                          method grep

                          grep: { (value: string): Mocha; (value: RegExp): Mocha };

                            method growl

                            growl: () => Mocha;
                            • Enables growl support.

                            method ignoreLeaks

                            ignoreLeaks: (value: boolean) => Mocha;

                              method invert

                              invert: () => Mocha;

                                method noHighlighting

                                noHighlighting: (value: boolean) => Mocha;

                                  method reporter

                                  reporter: {
                                  (name: string): Mocha;
                                  (reporter: (runner: Mocha.IRunner, options: any) => any): Mocha;
                                  };
                                  • Sets reporter by name, defaults to "spec".

                                  • Sets reporter constructor, defaults to mocha.reporters.Spec.

                                  method run

                                  run: (onComplete?: (failures: number) => void) => Mocha.IRunner;
                                  • Runs tests and invokes onComplete() when finished.

                                  method setup

                                  setup: (options: MochaSetupOptions) => Mocha;
                                  • Setup mocha with the given options.

                                  method slow

                                  slow: (value: number) => Mocha;

                                    method throwError

                                    throwError: (error: Error) => void;
                                    • Function to allow assertion libraries to throw errors directly into mocha. This is useful when running tests in a browser because window.onerror will only receive the 'message' attribute of the Error.

                                    method timeout

                                    timeout: (value: number) => Mocha;

                                      method ui

                                      ui: (value: string) => Mocha;

                                        method useColors

                                        useColors: (value: boolean) => Mocha;

                                          method useInlineDiffs

                                          useInlineDiffs: (value: boolean) => Mocha;

                                            interface IContextDefinition

                                            interface IContextDefinition {}

                                              method only

                                              only: (description: string, spec: () => void) => ISuite;

                                                method skip

                                                skip: (description: string, spec: () => void) => void;

                                                  method timeout

                                                  timeout: (ms: number) => void;

                                                    call signature

                                                    (description: string, spec: () => void): ISuite;

                                                      interface IRunnable

                                                      interface IRunnable {}
                                                      • Partial interface for Mocha's Runnable class.

                                                      property async

                                                      async: boolean;

                                                        property fn

                                                        fn: Function;

                                                          property sync

                                                          sync: boolean;

                                                            property timedOut

                                                            timedOut: boolean;

                                                              property title

                                                              title: string;

                                                                interface IRunner

                                                                interface IRunner {}
                                                                • Partial interface for Mocha's Runner class.

                                                                interface ISuite

                                                                interface ISuite {}
                                                                • Partial interface for Mocha's Suite class.

                                                                property parent

                                                                parent: ISuite;

                                                                  property title

                                                                  title: string;

                                                                    method fullTitle

                                                                    fullTitle: () => string;

                                                                      interface ITest

                                                                      interface ITest extends IRunnable {}
                                                                      • Partial interface for Mocha's Test class.

                                                                      property parent

                                                                      parent: ISuite;

                                                                        property pending

                                                                        pending: boolean;

                                                                          method fullTitle

                                                                          fullTitle: () => string;

                                                                            interface ITestDefinition

                                                                            interface ITestDefinition {}

                                                                              method only

                                                                              only: {
                                                                              (expectation: string, assertion?: () => void): ITest;
                                                                              (expectation: string, assertion?: (done: MochaDone) => void): ITest;
                                                                              };

                                                                                method skip

                                                                                skip: {
                                                                                (expectation: string, assertion?: () => void): void;
                                                                                (expectation: string, assertion?: (done: MochaDone) => void): void;
                                                                                };

                                                                                  method timeout

                                                                                  timeout: (ms: number) => void;

                                                                                    call signature

                                                                                    (expectation: string, assertion?: () => void): ITest;

                                                                                      call signature

                                                                                      (expectation: string, assertion?: (done: MochaDone) => void): ITest;

                                                                                        namespace mocha.reporters

                                                                                        namespace mocha.reporters {}

                                                                                          class Base

                                                                                          class Base {}

                                                                                            constructor

                                                                                            constructor(runner: IRunner);

                                                                                              property stats

                                                                                              stats: {
                                                                                              suites: number;
                                                                                              tests: number;
                                                                                              passes: number;
                                                                                              pending: number;
                                                                                              failures: number;
                                                                                              };

                                                                                                class Doc

                                                                                                class Doc extends Base {}

                                                                                                  class Dot

                                                                                                  class Dot extends Base {}

                                                                                                    class HTML

                                                                                                    class HTML extends Base {}

                                                                                                      class HTMLCov

                                                                                                      class HTMLCov extends Base {}

                                                                                                        class JSON

                                                                                                        class JSON extends Base {}

                                                                                                          class JSONCov

                                                                                                          class JSONCov extends Base {}

                                                                                                            class JSONStream

                                                                                                            class JSONStream extends Base {}

                                                                                                              class Landing

                                                                                                              class Landing extends Base {}

                                                                                                                class List

                                                                                                                class List extends Base {}

                                                                                                                  class Markdown

                                                                                                                  class Markdown extends Base {}

                                                                                                                    class Min

                                                                                                                    class Min extends Base {}

                                                                                                                      class Nyan

                                                                                                                      class Nyan extends Base {}

                                                                                                                        class Progress

                                                                                                                        class Progress extends Base {}

                                                                                                                          constructor

                                                                                                                          constructor(
                                                                                                                          runner: IRunner,
                                                                                                                          options?: {
                                                                                                                          open?: string;
                                                                                                                          complete?: string;
                                                                                                                          incomplete?: string;
                                                                                                                          close?: string;
                                                                                                                          }
                                                                                                                          );
                                                                                                                          • Parameter

                                                                                                                            options.open String used to indicate the start of the progress bar.

                                                                                                                            Parameter

                                                                                                                            options.complete String used to indicate a complete test on the progress bar.

                                                                                                                            Parameter

                                                                                                                            options.incomplete String used to indicate an incomplete test on the progress bar.

                                                                                                                            Parameter

                                                                                                                            options.close String used to indicate the end of the progress bar.

                                                                                                                          class Spec

                                                                                                                          class Spec extends Base {}

                                                                                                                            class TAP

                                                                                                                            class TAP extends Base {}

                                                                                                                              class XUnit

                                                                                                                              class XUnit extends Base {}

                                                                                                                                constructor

                                                                                                                                constructor(runner: IRunner, options?: any);

                                                                                                                                  namespace ts-helpers

                                                                                                                                  module 'ts-helpers' {}

                                                                                                                                    Package Files (4)

                                                                                                                                    Dependencies (0)

                                                                                                                                    No dependencies.

                                                                                                                                    Dev Dependencies (7)

                                                                                                                                    Peer Dependencies (1)

                                                                                                                                    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/ts-helpers.

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