git.schokokeks.org
Repositories
Help
Report an Issue
fs-words.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
409a0a2
Branches
Tags
develop-client_server
master
typescript
fs-words.git
client
source
conf.ts
[mod] client
Christian Fraß
commited
409a0a2
at 2021-03-12 22:01:10
conf.ts
Blame
History
Raw
namespace folksprak.words.conf { /** */ var _data : any = undefined; /** */ export function setup() : Promise<void> { return ( fetch('conf.json') .then(x => x.json()) .then ( data => { _data = data; return Promise.resolve<void>(undefined); } ) ); } /** */ export function get(key : string) : any { if (_data === undefined) { throw (new Error('conf not loaded')); } else { return lib_object.path_read<any>(_data, key, null, 2); } } }