diff --git a/lib/config.service.ts b/lib/config.service.ts index 6db94803..d4fe5e39 100644 --- a/lib/config.service.ts +++ b/lib/config.service.ts @@ -134,7 +134,7 @@ export class ConfigService< * @param propertyPath * @param options */ - getOrThrow = any, R = PathValue>( + getOrThrow = any>( propertyPath: P, options: ConfigGetOptions, ): Exclude; @@ -183,7 +183,7 @@ export class ConfigService< | undefined; if (isUndefined(value)) { - throw new TypeError(`Configuration key "${propertyPath}" does not exist`); + throw new TypeError(`Configuration key "${propertyPath.toString()}" does not exist`); } return value as Exclude;