TypeScript tal vez escriba

// for optional values you can use ? operator
interface Example {
	name: string,
  	age ?: 12
}

// for type keyword, this works as or condition
type Example2 = "string" | undefined
Himanshu Jangid