[TS Lint Error] Array type using "T[]" is forbidden?
emjimadhu opened this issue · 3 comments
emjimadhu commented
I am trying to create the base service. But i get tslint error. this is the method
async findAll(
filter = {},
selectFields: {}
): Promise<InstanceType<T>[]> {
if (selectFields) {
return this.model.find(filter).select(selectFields).exec();
} else {
return this.model.find(filter).exec();
}
}
nartc commented
I think that's a new TSLint rule for complex type or something. Can you try: Array<InstanceType<T>>
?
emjimadhu commented
nartc commented
@emjimadhu Can you share your whole base.service.ts ?