This is not working, I can't figure out how to type this with giving limits to the types with Record
function test<U extends ThisType<T>, T extends Record<string, string | ((this: U) => string)>>(t: T) {
// ...
}
const zoo = test({
first_name: "John",
last_name: "Doe",
get_name() {
// HOW TO GET `this.` working?
return this.first_name + " " + this.last_name;
}
})