mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 11:57:33 +08:00
Sync latest parse-git-config api changes
This commit is contained in:
8
types/parse-git-config/index.d.ts
vendored
8
types/parse-git-config/index.d.ts
vendored
@@ -36,10 +36,10 @@ interface Parse {
|
||||
* If no arguments are passed, the .git/config file relative to process.cwd() is used.
|
||||
*/
|
||||
sync(options?: (Options | object) | string): Config;
|
||||
/**
|
||||
* Returns an object with only the properties that had ini-style keys converted to objects.
|
||||
*/
|
||||
keys(config: Config): Config;
|
||||
/**
|
||||
* Returns an object with only the properties that had ini-style keys converted to objects.
|
||||
*/
|
||||
expandKeys(config: Config): Config;
|
||||
}
|
||||
|
||||
// no-empty-interface is disabled for a better debugging experience. Empty interfaces are used to alias a type alias.
|
||||
|
||||
@@ -99,12 +99,12 @@ function test_sync() {
|
||||
}
|
||||
}
|
||||
|
||||
function test_keys() {
|
||||
function test_expandKeys() {
|
||||
const config = {
|
||||
'foo "bar"': { doStuff: true },
|
||||
'foo "baz"': { doStuff: true }
|
||||
};
|
||||
const keys = parse.keys(config);
|
||||
const keys = parse.expandKeys(config);
|
||||
|
||||
keys.foo.bar.doStuff === true;
|
||||
keys.foo.baz.doStuff === true;
|
||||
|
||||
Reference in New Issue
Block a user