@nevware21/tripwire - v0.1.2
    Preparing search index...

    Function addAssertInstFuncDefs

    • Adds a set of scope functions to the assert (instance) prototype which will extend (or replace) IAssertInst definition, you can then use the IExtendedAssertInst type to cast the instance object returned via the expect function as it will contain the newly added functions.

      Note: These functions are NOT added to the assert or the instance returned via the createAssert only the IAssertInst object returned via the expect function.

      Type Parameters

      • T

      Parameters

      Returns void

      addAssertInstFuncDefs({
      myFunc: {
      scopeFn: function myFunc(this: IAssertScope) {
      // Do something
      }
      }
      });

      interface MyExpect extends IAssertInst {
      myFunc(): void;
      }

      let inst = expect("hello");
      let extInst = inst as IExtendedAssertInst<MyExpect>;
      extInst.myFunc();

      0.1.0