namespace folksprak.words.conf { /** */ var _data : any = undefined; /** */ export function setup() : Promise { return ( fetch('conf.json') .then(x => x.json()) .then ( data => { _data = data; return Promise.resolve(undefined); } ) ); } /** */ export function get(key : string) : any { if (_data === undefined) { throw (new Error('conf not loaded')); } else { return lib_object.path_read(_data, key, null, 2); } } }