[Properties-reader] Include missing methods (#42143)

* [Properties-reader] Include missing methods

* [Properties-reader] Fixed types

* [Properties-reader] Fix functions

* [Properties-reader] Delet whitespace
This commit is contained in:
oborrego 2020-02-11 17:47:17 +01:00 committed by GitHub
parent 2518661b4c
commit bde36fba08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -18,6 +18,9 @@ declare namespace PropertiesReader {
each<T>(iterator: (this: T, key: string, value: Value) => void, scope: T): Reader;
getAllProperties(): { [key: string]: Value; };
clone(): Reader;
save(destFile: string, onComplete?: (err: any, data: string) => void): Promise<string>;
getByRoot(root: any): { [key: string]: Value; };
bindToExpress(app: object, basePath?: string, makePaths?: boolean): Reader;
}
}

View File

@ -12,6 +12,8 @@ properties = properties.append('/another.file').append('/yet/another.file');
properties = properties.read('some.property = Value \n another.property = Another Value');
properties = properties.set('property.name', 'Property Value');
properties.save('/another.file');
properties.get('main.some.thing') === 'foo';
properties.get('blah.some.thing') === 'bar';