Skip to main content
Module

x/rimbu/typical/mod.ts>Str.NonEmptyString

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
type alias Str.NonEmptyString
import { type Str } from "https://deno.land/x/rimbu@0.12.3/typical/mod.ts";
const { NonEmptyString } = Str;

Returns never if the given string is empty, otherwise the given string.

Examples

Example 1

NonEmptyString<''> => never
NonEmptyString<'abc'> => 'abc'

Type Parameters

S extends string
definition: "" extends S ? never : unknown