Chok’s Typescript Utilities
    Preparing search index...

    Function isNativePromise

    • A type guard to check if an object is a native Promise.

      Note that if the Promise expects a certain type like Promise<T>, there is no way to validate the type of T unless we resolve the promise. This function does not attempt to typecheck for T in any way.

      Parameters

      • obj: unknown

      Returns obj is Promise<unknown>