Complete the code to extend interface B from interface A.
interface A {
name: string;
}
interface B extends [1] {
age: number;
}Interface B extends interface A, so it inherits the properties of A.
Complete the code to extend interface C from interfaces A and B.
interface A {
name: string;
}
interface B {
age: number;
}
interface C extends [1] {
location: string;
}To extend multiple interfaces, list them separated by commas after 'extends'.
Fix the error in the interface extension syntax.
interface A {
name: string;
}
interface B extends [1] {
age: number;
}Interface B can only extend one interface at a time unless multiple are listed separated by commas. Here, only 'A' is correct.
Fill both blanks to correctly extend interface D from interfaces A and B.
interface A {
name: string;
}
interface B {
age: number;
}
interface D extends [1][2] {
location: string;
}Multiple interfaces are extended by listing them separated by commas after 'extends'.
Fill all three blanks to create interface E that extends interfaces A, B, and C.
interface A {
name: string;
}
interface B {
age: number;
}
interface C {
location: string;
}
interface E extends [1][2][3] {
email: string;
}To extend multiple interfaces, list them separated by commas after 'extends'.