// simple interface
interface TallPerson {
firstName: string;
lastName: string;
middleInit?: string; // optional property
readonly x: number; // only be modifiable when an object is first created
(source: string, subString: string): boolean; // a function type - only defines params and return types
[index: number]: string; // Indexable types to describe array. index sig describes types i.e.:["Bob", "Fred"]
[propName: string]: any; // index signature - object can have any number of additional props and still be valid
}
Comments