typescript interface allowed values code example
Example 1: ts interface optional parameter
interface Person {
name: string;
age: number;
phone?: string;
}
let p: Person = {name: "Ashlee", age: 29};
console.log(p);
Example 2: typescript valueof interface
type ValueOf<T> = T[keyof T];