UNPKG

rivo

Version:

🤖 The ultimate library you need for composable type-level programming in TypeScript, powered by HKT.

9 lines (6 loc) • 304 B
import type { Args, Fn } from "../HKT"; export type EndsWith<Suffix extends string, S extends string> = S extends `${string}${Suffix}` ? true : false; export default interface EndsWithFn extends Fn<[string, string], boolean> { def: ([suffix, s]: Args<this>) => EndsWith<typeof suffix, typeof s>; }