error TS2304: Cannot find name 'T'
fea17e86 opened this issue · 4 comments
fea17e86 commented
Hi
In src/api/models/base.model.ts(4,6) @pre
is used with the generic type T
:
nest-mean/server/src/shared/base.model.ts
Line 15 in 9730cd9
Typescript reports the error src/api/models/base.model.ts(4,6): error TS2304: Cannot find name 'T'.
Is there a fix for that?
DouglasWebster commented
I just replaced
@pre<T>('findOneAndUpdate', fuction() { ...
with
@pre<any>('findOneAndUpdate', fuction() { ...
and so far it seems to work OK.
cesar3030 commented
I Have the same problem as well :/
nartc commented
@fea17e86 @cesar3030 You can just remove the generic. I put the generic there because it was required at the time I made this tutorial. But it seems that it's no longer required.