You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to be able to use strict typing within my service. Using config.get<string>('something', 'something') will mean type string | undefined is used. Need to be able to specify default type like get<string, string>() where get<T, U>(pattern: string, def?: U): T | U
Actual behavior or outcome (for issue)
Cannot compile because string | undefined doesn't match string
Replication/Example
The text was updated successfully, but these errors were encountered:
Issue type:
nestjs-config version
@nestjs/common+core or other package versions
Excepted behavior
I want to be able to use strict typing within my service. Using
config.get<string>('something', 'something')
will mean typestring | undefined
is used. Need to be able to specify default type likeget<string, string>()
whereget<T, U>(pattern: string, def?: U): T | U
Actual behavior or outcome (for issue)
Cannot compile because
string | undefined
doesn't matchstring
Replication/Example
The text was updated successfully, but these errors were encountered: