This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare namespace magikcraft { | |
} | |
declare namespace http { | |
function get(url: string): Object; | |
function post(url: string, data: Object): Object; | |
function post(url: string, data: any, contentType: string): Object; | |
} | |
/** | |
* The eventbus is a global pub/sub system. It is useful for your own code, and it also the mechanism that allows your code to communicate with code that others are running on the server. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This is the Insulin class | |
* Create a new instance of this class for basal and fast-acting insulins. | |
* | |
* param {number} onsetDelay - the number of seconds before the insulin effect kicks instance. | |
* param {number} duration - the number of seconds of the total effective duration of this insulin. | |
* param {number} peak - the number of seconds to the peak action of the insulin. Set to 0 for a flat (consistent) effect. Is modelled as a bell curve centered on the peak. | |
* param {number} power - the effect of the insulin. This is the peak power for insulins wiht a peak response. | |
*/ | |
const magik = magikcraft.io; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var magik = magikcraft.io; | |
magik.dixit('Initiating Game Loop'); | |
if (gameloop) { | |
magik.clearInterval(gameloop); | |
} | |
var gameloop = magik.setInterval(doLoop, 1000); | |
function doLoop() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare function require(moduleName: string): any; | |
declare const module: any; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var magik = magikcraft.io; | |
function es6() { | |
const names = ["Josh", "the", "Legend"]; | |
names.map((name) => magik.dixit(`Yo ${name}`)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const magik = magikcraft.io; | |
function spell(){ | |
We need to put the babel transpiler in a webworker. | |
a | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const magik = magikcraft.io; | |
function spell(){ | |
We need to put the babel transpiler in a webworker. | |
a | |
} | |
} |