mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 04:49:15 +08:00
20 lines
325 B
TypeScript
20 lines
325 B
TypeScript
import Conf = require('conf');
|
|
|
|
const conf = new Conf();
|
|
conf.set('foo', 'bar');
|
|
conf.set('hello', 1);
|
|
conf.set('unicorn', false);
|
|
conf.set('object', {
|
|
foo: 'bar',
|
|
unicorn: ['rainbow']
|
|
});
|
|
|
|
conf.get('foo');
|
|
conf.delete('foo');
|
|
conf.has('foo');
|
|
conf.clear();
|
|
|
|
for (const value of conf) {
|
|
console.log(value[0], value[1]);
|
|
}
|