Skip to main content
Home

latest

Collection of type utils

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
a year ago (1.0.6)
type alias TypeGuard

TypeGuard is a type alias representing a function that takes an unknown value and returns a value of type T.

Type Parameters

  • The type of value returned by the type guard.

Definition

(val: unknown) => T

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@clapp/types

Import symbol

import { type TypeGuard } from "@clapp/types";
or

Import directly with a jsr specifier

import { type TypeGuard } from "jsr:@clapp/types";

Add Package

pnpm i jsr:@clapp/types
or (using pnpm 10.8 or older)
pnpm dlx jsr add @clapp/types

Import symbol

import { type TypeGuard } from "@clapp/types";

Add Package

yarn add jsr:@clapp/types
or (using Yarn 4.8 or older)
yarn dlx jsr add @clapp/types

Import symbol

import { type TypeGuard } from "@clapp/types";

Add Package

vlt install jsr:@clapp/types

Import symbol

import { type TypeGuard } from "@clapp/types";

Add Package

npx jsr add @clapp/types

Import symbol

import { type TypeGuard } from "@clapp/types";

Add Package

bunx jsr add @clapp/types

Import symbol

import { type TypeGuard } from "@clapp/types";