oak-domain/test/test.ts

15 lines
136 B
TypeScript

type A = {
name?: string;
}
function test(a: A) {
}
type B = {
[A in 'name' | 'age']?: string;
}
const b : B = {};
test(b);