models/user.ts 에서 User class 를 default export 하고
불러와서 타입에 할당했는데 다음과 같은 에러가 나타납니다.
혹시 이런에러가 나타났을때 해결을 어떻게해야할까요?
(alias) class User
import User
No overload matches this call.
Overload 1 of 2, '(fn: (user: User, done: (err: any, id?: unknown) => void) => void): void', gave the following error.
Argument of type '(user: import("/home/ywoosang/\uBC14\uD0D5\uD654\uBA74/projects/service/models/user").default, done: (err: any, id?: unknown) => void) => void' is not assignable to parameter of type '(user: Express.User, done: (err: any, id?: unknown) => void) => void'.
Types of parameters 'user' and 'user' are incompatible.
Type 'User' is missing the following properties from type 'User': id, nickname, email, password, and 34 more.
Overload 2 of 2, '(fn: (req: IncomingMessage, user: User, done: (err: any, id?: unknown) => void) => void): void', gave the following error.
Argument of type '(user: User, done: (err: any, id?: unknown) => void) => void' is not assignable to parameter of type '(req: IncomingMessage, user: User, done: (err: any, id?: unknown) => void) => void'.
Types of parameters 'user' and 'req' are incompatible.
Type 'IncomingMessage' is missing the following properties from type 'User': id, nickname, email, password, and 33 more.ts(2769)