Merge remote-tracking branch 'remotes/origin/master' into mode_live_edit
Conflicts: demo/kitchen-sink/demo.js lib/ace/mode/coffee_highlight_rules_test.js
This commit is contained in:
commit
3d6ce5fdf5
89 changed files with 3929 additions and 12705 deletions
|
|
@ -16,7 +16,7 @@ index 23fc3fc..ed3b273 100644
|
|||
|
||||
+ this.highlight = function(re) {
|
||||
+ if (!this.$searchHighlight) {
|
||||
+ var highlight = new SearchHighlight(null, "ace_selected_word", "text");
|
||||
+ var highlight = new SearchHighlight(null, "ace_selected-word", "text");
|
||||
+ this.$searchHighlight = this.addDynamicMarker(highlight);
|
||||
+ }
|
||||
+ this.$searchHighlight.setRegexp(re);
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
setTimeout("ShowAndGrowElement()", timer_increment)
|
||||
}
|
||||
window.ShowAndGrowElement = ShowAndGrowElement
|
||||
]]</script>
|
||||
]]></script>
|
||||
|
||||
<rect
|
||||
fill="#2e3436"
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
72
demo/kitchen-sink/docs/typescript.ts
Normal file
72
demo/kitchen-sink/docs/typescript.ts
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
class Greeter {
|
||||
greeting: string;
|
||||
constructor (message: string) {
|
||||
this.greeting = message;
|
||||
}
|
||||
greet() {
|
||||
return "Hello, " + this.greeting;
|
||||
}
|
||||
}
|
||||
|
||||
var greeter = new Greeter("world");
|
||||
|
||||
var button = document.createElement('button')
|
||||
button.innerText = "Say Hello"
|
||||
button.onclick = function() {
|
||||
alert(greeter.greet())
|
||||
}
|
||||
|
||||
document.body.appendChild(button)
|
||||
|
||||
class Snake extends Animal {
|
||||
move() {
|
||||
alert("Slithering...");
|
||||
super(5);
|
||||
}
|
||||
}
|
||||
|
||||
class Horse extends Animal {
|
||||
move() {
|
||||
alert("Galloping...");
|
||||
super.move(45);
|
||||
}
|
||||
}
|
||||
|
||||
module Sayings {
|
||||
export class Greeter {
|
||||
greeting: string;
|
||||
constructor (message: string) {
|
||||
this.greeting = message;
|
||||
}
|
||||
greet() {
|
||||
return "Hello, " + this.greeting;
|
||||
}
|
||||
}
|
||||
}
|
||||
module Mankala {
|
||||
export class Features {
|
||||
public turnContinues = false;
|
||||
public seedStoredCount = 0;
|
||||
public capturedCount = 0;
|
||||
public spaceCaptured = NoSpace;
|
||||
|
||||
public clear() {
|
||||
this.turnContinues = false;
|
||||
this.seedStoredCount = 0;
|
||||
this.capturedCount = 0;
|
||||
this.spaceCaptured = NoSpace;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue