Variable disposableConst

disposable: {
    asyncUsing: (<T>(args) => Promise<T>);
    using: (<T>(args) => T);
} = ...

Type declaration

  • asyncUsing: (<T>(args) => Promise<T>)
      • <T>(args): Promise<T>
      • Mimics the c# using IDisposable. Always runs the specified 'thenOnDisposeRunFunc' after main function 'runMainFunc' has finished. UseFull for cleaning up, or to make sure a flagState always are set back to default, even if there are exceptions.

        Type Parameters

        • T

        Parameters

        • args: {
              runMain: (() => Promise<T>);
              thenDispose: (() => void);
          }
          • runMain: (() => Promise<T>)
              • (): Promise<T>
              • Returns Promise<T>

          • thenDispose: (() => void)
              • (): void
              • Returns void

        Returns Promise<T>

  • using: (<T>(args) => T)
      • <T>(args): T
      • Mimics the c# using IDisposable. Always runs the specified 'thenOnDisposeRunFunc' after main function 'runMainFunc' has finished. UseFull for cleaning up, or to make sure a flagState always are set back to default, even if there are exceptions.

        Type Parameters

        • T

        Parameters

        • args: {
              runMain: (() => T);
              thenDispose: (() => void);
          }
          • runMain: (() => T)
              • (): T
              • Returns T

          • thenDispose: (() => void)
              • (): void
              • Returns void

        Returns T

Generated using TypeDoc