From 030765d409f1f0dcd43fd71736c85f2fa18bc1f8 Mon Sep 17 00:00:00 2001 From: Rob Pilling Date: Sat, 16 Mar 2024 13:06:09 +0000 Subject: [PATCH] layout.d.ts: permit assignment back to strings ... by making them strings instead of a string literal type --- typescript/types/layout.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/types/layout.d.ts b/typescript/types/layout.d.ts index 58aa98ecd..55ddd7135 100644 --- a/typescript/types/layout.d.ts +++ b/typescript/types/layout.d.ts @@ -7,7 +7,7 @@ type ExtractIds = [Depth] extends [never] ? never : (T extends { id?: infer Id extends string } - ? { [k in Id]: { -readonly [P in keyof T]: T[P] } } + ? { [k in Id]: { -readonly [P in keyof T]: T[P] extends string ? string : T[P] } } : never) | (