Closed MinaFayez9 closed 1 year ago
Please provide a minimum reproduction repository. You can start from this minimal project on Stackblitz.
It's a type error not a bug and it is very clear, so this is very bureaucratic Here is your "minimum reproduction repository"
Thank you @MinaFayez9. Would you like to create a PR for this issue? This looks like an easy fix (get()
method works as expected)
@kamilmysliwiec I am always happy to help, but after checking out the repo, I found that it was already fixed 5 months ago https://github.com/nestjs/config/commit/73074929cc87dc393c209746c3b4801be74fdff2
I see now from npm that you never published a new release since 7 months, that's why the fix is not live
So is there a known plan for when will you have a new publish/release ?
Published as 2.3.0
Is there an existing issue for this?
Current behavior
After checking the
node_modules\@nestjs\config\dist\config.service.d.ts
get
isget<T = K, P extends Path<T> = any, R = PathValue<T, P>>(propertyPath: P, options: ConfigGetOptions): ExcludeUndefinedIf<WasValidated, R>;
getOrThrow
isgetOrThrow<T = K, P extends Path<T> = any>(propertyPath: P, options: ConfigGetOptions): Exclude<T, undefined>;
Minimum reproduction code
https://stackblitz.com/edit/nestjs-issue-minimum-repro-starter-zcprps?file=README.md
Steps to reproduce
Check
main.ts
Expected behavior
Signature of
getOrThrow
should begetOrThrow<T = K, P extends Path<T> = any, R = PathValue<T, P>>(propertyPath: P, options: ConfigGetOptions): Exclude<R, undefined>;
Package
Other package
"@nestjs/config
NestJS version
9.2.1
Packages versions
Node.js version
18.13.0
In which operating systems have you tested?
Other
No response