fix: return type of findByID with strict: true (#8953)
### What? Corrects the return type of `findByID` when `strict: true` / `strictNullChecks: true` is used, adds `null` to the return type _only_ when `disableErrors: true` is passed.  
This commit is contained in:
@@ -163,9 +163,9 @@ export type SelectMode = 'exclude' | 'include'
|
||||
|
||||
export type SelectType = SelectExcludeType | SelectIncludeType
|
||||
|
||||
export type ApplyDisableErrors<T, DisableErrors extends boolean> = DisableErrors extends true
|
||||
? null | T
|
||||
: T
|
||||
export type ApplyDisableErrors<T, DisableErrors = false> = false extends DisableErrors
|
||||
? T
|
||||
: null | T
|
||||
|
||||
export type TransformDataWithSelect<
|
||||
Data extends Record<string, any>,
|
||||
|
||||
Reference in New Issue
Block a user