Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/froebel/isPromise.ts>isNotPromise

A strictly typed utility library.
Go to Latest
variable isNotPromise
import { isNotPromise } from "https://deno.land/x/froebel@v0.21.3/isPromise.ts";

Checks if value is not a promise.

Examples

Example 1

(value: number | Promise<unknown>) => {
  if (isNotPromise(value)) return value / 2
}

type

<T>(value: T) => value is Exclude<T, Promise<any>>