defain default valu in typescript interface 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'
}