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

x/windmill/node_modules/tsafe/exclude.d.ts>exclude

Windmill deno client (separated from the main repo because most of the code is auto-generated from the openapi and not worth committing)
Go to Latest
function exclude
import { exclude } from "https://deno.land/x/windmill@v1.394.6/node_modules/tsafe/exclude.d.ts";

Return a function to use as Array.prototype.filter argument to exclude one or many primitive value element from the array. Ex: ([ "a", "b", "c" ] as const).filter(exclude("a")) return ("b" | "c")[] Ex: ([ "a", "b", "c", "d"] as const).filter(exclude(["a", "b"]) gives ("c" | "d")[]

Type Parameters

T extends
| string
| number
| null
| undefined
| boolean

Parameters

target: readonly T[] | T

Returns

<U>(str: U) => str is Exclude<U, T>