feat(typescript-types): Add IsEmptyKey<S>

This commit is contained in:
T. R. Bernstein
2025-07-14 22:09:36 +02:00
parent bb706e7780
commit 0cbc6d41a4
3 changed files with 12 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
import type { IsEmptyString } from '@/is-empty-string.js'
import { expect } from 'tstyche'
expect<IsEmptyString<''>>().type.toBe<true>()
expect<IsEmptyString<any>>().type.toBe<true>()
expect<IsEmptyString<'nonempty'>>().type.toBe<false>()
expect<IsEmptyString<never>>().type.toBe<false>()