1176
}
1177
pkgConf(key: string, rootPath?: string): YargsInstance {
1178
>
argsert('<string> [string]', [key, rootPath], arguments.length);
yargs-factory.ts
1179
>
let conf = null;
1180
>
// prefer cwd to require-main-filename in this method
1181
>
// since we're looking for e.g. "nyc" config in nyc consumer
1182
>
// rather than "yargs" config in nyc (where nyc is the main filename)
1183
>
const obj = this[kPkgUp](rootPath || this.#cwd);
1184
>
1185
>
// If an object exists in the key, add it to options.configObjects
1186
>
if (obj[key] && typeof obj[key] === 'object') {
1187
conf = applyExtends(
1188
obj[key] as {[key: string]: string},