// This is a dummy file to make sure that we typecheck the
// freedom-typescript-api files.
///
///
// Some imaginary trivial code for a freedom core env code to load a module
// handle messages and send a message.
freedom('freedom-module.json', {
'logger': 'loggingprovider.json',
'debug': 'log'})
.then((moduleFactory:() => freedom.OnAndEmit) => {
var moduleStub :freedom.OnAndEmit = moduleFactory();
moduleStub.on('messageFromModuleType', (x:string) => {
console.log(x);
});
moduleStub.emit('messageToModuleType', {});
}, (e:Error) => {
console.error('Could not load freedom module: ' + e.message);
});