tsc 5-property.ts --target es5 && node 5-property.js
let message; // any
message = 'nuwan';
let endsWithC = (<string>message).endsWith('c'); // common interpretation
let alternativeWay = (message as string).endsWith('c')
Interfaces are purely for decalaration NOT for implementation
function sum(point:{x:number,y:number}) => x + y ; // in-line annotation
Inline annotation is bit unclear so, we can use interface instead
interface IPoint {
x: number,
y: number
}
function sum(point:IPoint) => ...