var TestVar = null;
let isValid = false;
const apikey = 'hello';
var counter;
var sum : number;
var height: number = 6;
var isDone: boolean = false;
var xin: string = "Carl";
var list_char:string[] = ['a', 'b', 'c'];
var list_num:Array<number> = [1, 2, 3];
var list_any:any[] = ['a', 1, true];
enum Color {Red, Green, Blue};
var c: Color = Color.Green;
function test(): void {
alert("This is a test msg.")
}
var path : string[] | string;
path = '/temp/log.xml';
path = ['/temp/log.xml', '/temp/errors.xml'];
path = 1;
var x : any = {};
if(typeof x === 'string') {
console.log(x.splice(3,1));
}
x.foo();
type MyNumber = number;
type CallBack = () => void;
interface ICustomConsole {
log(arg : string) : void;
}
declare var customConsole : ICustomConsole;
customConsole.log('A log entry');