export {};

// 1. NonNullableProps
type Response = { success: boolean; message?: string };
type NonNullableProps<T> = any;
type NonNullableResponse = NonNullableProps<Response>;
// Erwartet:
// { success: boolean; message: string; }

// 2. ReadonlyExcept
type Event = { timestamp: number; type: string };
type ReadonlyExcept<T, K extends keyof T> = any;
type ReadonlyExceptType = ReadonlyExcept<Event, 'type'>;
// Erwartet:
// { readonly timestamp: number; type: string; }

// 3. KeysOfType
type Settings = { darkMode: boolean; isActive: boolean; fontSize: number };
type KeysOfType<T, U> = any;
type KeysWithBoolean = KeysOfType<Settings, boolean>;
// Erwartet: "darkMode" | "isActive"

// 4. NumberKeys
type Employee = { id: number; name: string; salary: number };
type NumberKeys<T> = any;
type KeysWithNumbers = NumberKeys<Employee>;
// Erwartet: "id" | "salary"

// 5. ReturnTypeOf
type FetchFn = () => Promise<string>;
type ReturnTypeOf<T> = any;
type FetchResult = ReturnTypeOf<FetchFn>;
// Erwartet: Promise<string>

// 6. FilterStrings
type Values = { a: string; b: number; c: boolean };
type FilterStrings<T> = any;
type OnlyStrings = FilterStrings<Values>;
// Erwartet:
// { a: string; }

// 7. FunctionKeys
type Button = { text: string; onClick: () => void };
type FunctionKeys<T> = any;
type FnKeys = FunctionKeys<Button>;
// Erwartet: "onClick"

// 8. ToRequired
type OptionalFields = { foo?: string; bar?: number };
type ToRequired<T> = any;
type RequiredFields = ToRequired<OptionalFields>;
// Erwartet:
// { foo: string; bar: number; }

// 9. NonFunctionKeys
type Logger = { log: () => void; level: string };
type NonFunctionKeys<T> = any;
type OnlyProps = NonFunctionKeys<Logger>;
// Erwartet: "level"

// 10. NullableStrings
type Product = { price: number; name: string };
type NullableStrings<T> = any;
type NullableProduct = NullableStrings<Product>;
// Erwartet:
// { price: number; name: string | null; }
