Skip to main content

Built and signed on GitHub Actions

A collection of the most common types used across kz packages, adapted for API consistency and case-coverage, exhaustively tested, and documented thoroughly.

This package works with Node.js, DenoIt is unknown whether this package works with Bun, Cloudflare Workers, Browsers
JSR Score
100%
Published
a month ago (0.0.5)
type alias Defined

Describes a type that if defined, is of type T, otherwise is never.

Examples

Example 1

import type { Defined } from './type-aliases.ts';

let value: Defined<number>;

value = 42;

Type Parameters

T

The type of the value if defined.

Definition

T extends undefined ? never : T

Add Package

deno add @kz/common-types

Import symbol

import { type Defined } from "@kz/common-types";

Add Package

npx jsr add @kz/common-types

Import symbol

import { type Defined } from "@kz/common-types";

Add Package

yarn dlx jsr add @kz/common-types

Import symbol

import { type Defined } from "@kz/common-types";

Add Package

pnpm dlx jsr add @kz/common-types

Import symbol

import { type Defined } from "@kz/common-types";

Add Package

bunx jsr add @kz/common-types

Import symbol

import { type Defined } from "@kz/common-types";