From c64ead08a36fccc36a42b3e74362aa423cfb62ed Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 6 Jan 2016 17:10:19 +0100 Subject: Replace all CoffeeScript code by TypeScript --- src/app.ts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/app.ts (limited to 'src/app.ts') diff --git a/src/app.ts b/src/app.ts new file mode 100644 index 0000000..d1ca3cd --- /dev/null +++ b/src/app.ts @@ -0,0 +1,26 @@ +'use strict'; + + +require('./style.css'); + + +import * as lodash from 'lodash'; +_ = lodash; + +import MapContext from './control/MapContext'; +import MapData from './model/MapData'; + + +var mapContext: MapContext; + +window.onload = () => { + var xhr = new XMLHttpRequest(); + + xhr.onload = function() { + let mapDef = new MapData(JSON.parse(this.responseText)); + mapContext = new MapContext(mapDef); + } + + xhr.open('GET', 'resources/map/test.json', true); + xhr.send(); +}; -- cgit v1.2.3