Files
headroom/frontend/node_modules/@ark/util/out/get.d.ts
Santhosh Janardhanan de2d83092e feat: Reinitialize frontend with SvelteKit and TypeScript
- Delete old Vite+Svelte frontend
- Initialize new SvelteKit project with TypeScript
- Configure Tailwind CSS v4 + DaisyUI
- Implement JWT authentication with auto-refresh
- Create login page with form validation (Zod)
- Add protected route guards
- Update Docker configuration for single-stage build
- Add E2E tests with Playwright (6/11 passing)
- Fix Svelte 5 reactivity with $state() runes

Known issues:
- 5 E2E tests failing (timing/async issues)
- Token refresh implementation needs debugging
- Validation error display timing
2026-02-17 16:19:59 -05:00

10 lines
848 B
TypeScript

import type { conform } from "./generics.ts";
import type { keyOf } from "./records.ts";
type getKey<o, k> = k extends keyof o ? o[k] : k extends `${infer n extends number & keyof o}` ? o[n] : never;
type getPath<o, path extends string> = path extends `${infer head}.${infer tail}` ? getPath<getKey<o, head>, tail> : getKey<o, path>;
type validatePath<o, path extends string, prefix extends string = ""> = path extends `${infer head}.${infer tail}` ? head extends keyOf<o> ? validatePath<getKey<o, head>, tail, `${prefix}${head}.`> : `Key '${head}' is not valid following '${prefix}'` : {
[k in keyOf<o>]: k extends `${path}${string}` ? `${prefix}${k}` : never;
}[keyOf<o>];
export declare const get: <const o extends object, path extends string>(data: o, pathStr: conform<path, string & validatePath<o, path>>) => getPath<o, path>;
export {};