set default value in interface typescript code example
Example: typescript interface default value
// Use optionalproperties (here b and c)
interface IX {
a: string,
b?: any,
c?: AnotherType
}
let x: IX = {
a: 'abc'
}
// Use optionalproperties (here b and c)
interface IX {
a: string,
b?: any,
c?: AnotherType
}
let x: IX = {
a: 'abc'
}