ts-data-forge
    Preparing search index...
    • Checks if the given value is an Optional.

      Parameters

      • maybeOptional: unknown

        The value to check.

      Returns maybeOptional is Optional<unknown>

      true if the value is an Optional, otherwise false.

      const maybeOptional = Optional.some('value');
      const notOptional = { $$tag: 'ts-data-forge::Optional.some' };

      assert.ok(Optional.isOptional(maybeOptional));
      assert.notOk(Optional.isOptional(notOptional));