JSFiddle - React, Tailwind, and code Playground
by ChrisStanyon
TypeScript
//"use strict"
class Greeter {
var greeting: string;
constructor(message: string) {
this.greeting = message;
}
greet() {
console.log(this);
return "Hello, " + this.greeting;
}
}
class Test {
lhsValue: string;
//var name:string;
constructor() {
this.lhsValue = 'test';
}
test() {
var str2:string = <string> <any> this.lhsValue;
console.log(typeof(str2))
return "Hello, " + this.lhsValue;
}
}
//console.log("People " + lhsValue)
let t = new Test()
console.log(t.test());
let g = new Greeter(['chris', 'donna']);
console.log(g.greet());