import {expectType} from 'tsd'; import type {KebabCasedProperties} from '../index.d.ts'; type Foobar = {helloWorld1: {fooBar: string}}; type FoobarPunctuated = {'hello@World1': {'foo::Bar': string}}; declare const foo: KebabCasedProperties; expectType<{'hello-world1': {fooBar: string}}>(foo); declare const bar: KebabCasedProperties; expectType<{'hello-world-1': {fooBar: string}}>(bar); declare const fooBarPunctuated: KebabCasedProperties; expectType<{'hello@-world1': {'foo::Bar': string}}>(fooBarPunctuated); declare const fooBarPunctuatedSplit: KebabCasedProperties; expectType<{'hello-world1': {'foo::Bar': string}}>(fooBarPunctuatedSplit); declare const fooBarPunctuatedSplitNumberSplit: KebabCasedProperties; expectType<{'hello-world-1': {'foo::Bar': string}}>(fooBarPunctuatedSplitNumberSplit); // Verify example type User = { userId: number; userName: string; }; type UserPunctuated = { 'user::Id': number; 'user::Name': string; }; const result: KebabCasedProperties = { 'user-id': 1, 'user-name': 'Tom', }; expectType>(result); expectType>(result);