TypeScriptSyntax
Extend an Interface
Code example
interface Admin extends User {
role: string;
}Builds an interface from another.
In TypeScript, extend an interface: builds an interface from another — interface Admin extends User { role: string; }
interface Admin extends User {
role: string;
}interface Admin extends User {
role: string;
}Builds an interface from another.
Use interface Admin extends User { role: string; }.
Use this pattern: interface Admin extends User { role: string; }
Yes. Use Copy code and adapt the example to your program.
No. The language syntax is the same across operating systems.