Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Intellisense support #397

Open
mruknowme opened this issue Dec 27, 2020 · 1 comment
Open

No Intellisense support #397

mruknowme opened this issue Dec 27, 2020 · 1 comment

Comments

@mruknowme
Copy link

import { User } from '@models'; // working aliased path
import { Injectable } from '@nestjs/common';
import { ReturnModelType } from '@typegoose/typegoose';
import { InjectModel } from 'nestjs-typegoose';

// all imports are correct

@Injectable()
export class AuthService {

  constructor(
    @InjectModel(User) private readonly userModel: ReturnModelType<typeof User>
  ) {}
}

userModel is always of type any. Any ideas what could be wrong?

@kpfromer
Copy link
Owner

Could you paste the definition of your User and your package version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants