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

x/froebel/promise.ts>isNotPromise

A strictly typed utility library.
Go to Latest
variable isNotPromise
import { isNotPromise } from "https://deno.land/x/froebel@v0.18.0/promise.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>>