Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/rimbu/typical/str.ts>NonEmptyString

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

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