interface Animal { name: string; age: number; egg?: number; } let animal: Animal = <Animal>{}; console.log('------------------------'); console.log(animal.name); console.log('------------------------'); console.log(animal.age); console.log('------------------------'); console.log(animal.egg); console.log('------------------------');