mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-13 12:37:16 +08:00
Merge pull request #27886 from LexSwed/parse-git-config
[@types/parse-git-config] sync with latest api changes
This commit is contained in:
4
types/parse-git-config/index.d.ts
vendored
4
types/parse-git-config/index.d.ts
vendored
@@ -39,7 +39,7 @@ interface Parse {
|
||||
/**
|
||||
* Returns an object with only the properties that had ini-style keys converted to objects.
|
||||
*/
|
||||
keys(config: Config): Config;
|
||||
expandKeys(config: Config): Config;
|
||||
}
|
||||
|
||||
// no-empty-interface is disabled for a better debugging experience. Empty interfaces are used to alias a type alias.
|
||||
@@ -49,6 +49,8 @@ interface Options extends Pick<_Options, keyof _Options> { }
|
||||
interface _Options {
|
||||
cwd: string;
|
||||
path: string;
|
||||
include?: boolean;
|
||||
expandKeys?: boolean;
|
||||
}
|
||||
|
||||
type ParseCallback = ((err: Error | null, config: Config) => void);
|
||||
|
||||
@@ -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