Updates to Typescript highlighting

This commit is contained in:
Garen Torikian 2012-10-02 15:05:38 -07:00
commit 29e19fc062
2 changed files with 29 additions and 11 deletions

View file

@ -43,12 +43,30 @@ module Sayings {
}
}
}
var greeter = new Sayings.Greeter("world");
module Mankala {
export class Features {
public turnContinues = false;
public seedStoredCount = 0;
public capturedCount = 0;
public spaceCaptured = NoSpace;
var button = document.createElement('button')
button.innerText = "Say Hello"
button.onclick = function() {
alert(greeter.greet())
}
public clear() {
this.turnContinues = false;
this.seedStoredCount = 0;
this.capturedCount = 0;
this.spaceCaptured = NoSpace;
}
document.body.appendChild(button)
public toString() {
var stringBuilder = "";
if (this.turnContinues) {
stringBuilder += " turn continues,";
}
stringBuilder += " stores " + this.seedStoredCount;
if (this.capturedCount > 0) {
stringBuilder += " captures " + this.capturedCount + " from space " + this.spaceCaptured;
}
return stringBuilder;
}
}
}