Fix records in modules

This commit is contained in:
2024-11-15 23:23:14 +01:00
parent 53c3d7547a
commit 7ef6dc4411
2 changed files with 16 additions and 1 deletions
+9
View File
@@ -202,3 +202,12 @@ import { Type, Static } from '@sinclair/typebox'
const T = Type.Record(K, Type.String())
Expect(T).ToStatic<{}>()
}
{
const Module = Type.Module({
T: Type.Record(Type.String(), Type.Ref('A')),
A: Type.String({ format: 'email' }),
});
const T = Module.Import('T');
Expect(T).ToStatic<{ [x: string]: string }>()
}