-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Constructs explanation #64
Comments
Sure. public async SignUp(userInputDTO: IUserInputDTO): Promise<{ user: IUser; token: string }> {
...
} There we are using typescript to type the response of the function, which will be Promise where it holds a value that is an object with the shape of In plain javascript would be something similar to this async SignUp(userInputDTO) {
...
}; ====== Here we are using Mongoose, which is a node.js package to connect to Mongodb and an ODM export default mongoose.model<IUser & mongoose.Document>('User', User); The part where we are using Then the In practice, the ====== This is a little trickier export default ({ mongoConnection, models }: { mongoConnection; models: { name: string; model: any }[] }) We are exporting an object, which has this shape: |
Very kind of you and cristal clear. namespace Models { Thank you. |
Greetings,
Would you mind explain/comment the following construct, which I'm not familiar with :
Do they require a special package ? Where can I find a documentation ?
Thank you
The text was updated successfully, but these errors were encountered: