Skip to main content
Module

x/rimbu/base/mod.ts>IsPlainObj

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Latest
type alias IsPlainObj
import { type IsPlainObj } from "https://deno.land/x/rimbu@1.2.1/base/mod.ts";

A predicate type that resolves to true if the given type satisfies:

  • it is an object type (not a primitive)
  • it is not a function
  • it is not iterable
  • it does not have any properties that are functions Otherwise, it resolves to false
definition: T extends
| null
| undefined
| number
| string
| boolean
| bigint
| symbol
| Iterable<any>
| AsyncIterable<any>
? false : IsObjWithoutFunctions<T>