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

x/natico/examples/deps.ts>SplitIncludingDelimiters

A powerful and customizable framework for Discordeno
Latest
type alias SplitIncludingDelimiters
import { type SplitIncludingDelimiters } from "https://deno.land/x/natico@4.0.0-pre.4/examples/deps.ts";

Type Parameters

Source extends string
Delimiter extends string
definition: Source extends "" ? [] : Source extends `${infer FirstPart}${Delimiter}${infer SecondPart}` ? Source extends `${FirstPart}${infer UsedDelimiter}${SecondPart}` ? UsedDelimiter extends Delimiter ? Source extends `${infer FirstPart}${UsedDelimiter}${infer SecondPart}` ? [...SplitIncludingDelimiters<FirstPart, Delimiter>, UsedDelimiter, ...SplitIncludingDelimiters<SecondPart, Delimiter>] : never : never : never : [Source]