Interface
interface vs type alias
Prefer type alias over interface.
Why? Interface is a
Reference
Naming
- Name interface in PascalCase.
Do not prefix interface with
I
.tslint:
interface-name
Why? The concept of an interface in TypeScript is much more broad than in C# or Java, the
IFoo
naming convention is not broadly useful.// bad interface myInterface { } interface IDisposable { } // good interface MyInterface { } interface Disposable { }