Skip to content

Commit a3d5bae

Browse files
committed
woohoo
1 parent 62797c9 commit a3d5bae

2 files changed

Lines changed: 24 additions & 1 deletion

File tree

‎v3/js/opt-frontend.js‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,13 @@ var JS_EXAMPLES = {
195195
jsInhExLink: 'js-example-code/inheritance.js',
196196
};
197197

198+
var TS_EXAMPLES = {
199+
tsHelloExLink: 'ts-example-code/hello.ts',
200+
tsGreeterExLink: 'ts-example-code/greeter.ts',
201+
tsGreeterGenericsExLink: 'ts-example-code/greeter-generics.ts',
202+
tsInheritanceExLink: 'ts-example-code/inheritance.ts',
203+
};
204+
198205
var JAVA_EXAMPLES = {
199206
javaVarLink: 'java-example-code/Variables.java',
200207
javaCFLink: 'java-example-code/ControlFlow.java',
@@ -355,6 +362,9 @@ $(document).ready(function() {
355362
if (JS_EXAMPLES[myId] !== undefined) {
356363
exFile = JS_EXAMPLES[myId];
357364
lang = 'js';
365+
} else if (TS_EXAMPLES[myId] !== undefined) {
366+
exFile = TS_EXAMPLES[myId];
367+
lang = 'ts';
358368
} else if (JAVA_EXAMPLES[myId] !== undefined) {
359369
exFile = JAVA_EXAMPLES[myId];
360370
lang = 'java';

‎v3/visualize.html‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,15 @@
333333
<a class="exampleLink" id="jsInhExLink" href="#">inheritance</a>
334334
</p>
335335

336+
<p style="margin-top: 25px; font-weight: bold;">TypeScript Examples</p>
337+
338+
<p style="margin-top: 5px;">
339+
<a class="exampleLink" id="tsHelloExLink" href="#">hello</a> |
340+
<a class="exampleLink" id="tsGreeterExLink" href="#">classes</a> |
341+
<a class="exampleLink" id="tsInheritanceExLink" href="#">inheritance</a> |
342+
<a class="exampleLink" id="tsGreeterGenericsExLink" href="#">generics</a>
343+
</p>
344+
336345
</div>
337346

338347

@@ -360,7 +369,7 @@
360369
</div>
361370

362371
<p style="margin-top: 25px;">
363-
<a href="http://pythontutor.com/">Online Python Tutor</a> currently supports three
372+
<a href="http://pythontutor.com/">Online Python Tutor</a> currently supports four
364373
languages (despite its name!):</p>
365374

366375
<p>1. Python <a href="http://www.python.org/doc/2.7/">2.7</a> and <a
@@ -404,6 +413,10 @@
404413
href="https://github.com/pgbovine/OnlinePythonTutor/tree/master/v4-cokapi/backends/javascript">Backend
405414
source code</a>.</p>
406415

416+
<p>4. <a href="http://www.typescriptlang.org">TypeScript</a> 1.4.1 running in Node.js v0.10.25. <a
417+
href="https://github.com/pgbovine/OnlinePythonTutor/tree/master/v4-cokapi/backends/javascript">Backend
418+
source code</a>.</p>
419+
407420
<p>By using Online Python Tutor, your visualized code, options, user interactions, and IP
408421
address are logged on our server and may be analyzed for research
409422
purposes. Nearly all Web services collect this basic information from

0 commit comments

Comments
 (0)