You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a some classes that implement an interface. Those have injection decorator to work as Services. The problem is when I debug and I want to navigate to some implementation. Always I go to container.resolve and then I found a specific class. Is there any shortcut or vscode extension to help navigate directly to implementation ?.
... imports...
@injectable()exportclassUserRepositoryServiceImplimplementsIUserRepositoryService{constructor(@inject('IUserRepository')privateuserRepository: IUserRepository){}publicasyncfindOne(userId: number): Promise<UserDTO>{
let userDTO: UserDTO;constuser: IUser=awaitthis.userRepository.get(userId);if(user){userDTO=userasUserDTO;returnPromise.resolve(userDTO);}returnPromise.reject(newError('User not found'));}
...
....othersmethods
...
...
user-controller.ts
getUsers: async (req: Request,res: Response)=>{constsessionUser=req.session?.user;constrequest: UserRequestDTO={};
....
.....
.....try{constusers: UserDTO[]=awaitUserRepositoryService.findAll(request);// I want to navigate from here to UserRepositoryServiceImpl like netbeans or other IDEsreturnres.status(200).send(users);}catch(error){returnres.status(400).send(error);}},
The text was updated successfully, but these errors were encountered:
I have a some classes that implement an interface. Those have injection decorator to work as Services. The problem is when I debug and I want to navigate to some implementation. Always I go to container.resolve and then I found a specific class. Is there any shortcut or vscode extension to help navigate directly to implementation ?.
This is an example.
loader.ts file -> called from index.ts
user-repository.interface.ts
user-repository.service.ts
user-controller.ts
The text was updated successfully, but these errors were encountered: