proyecto26 / myapi Goto Github PK
View Code? Open in Web Editor NEWA template to create awesome APIs easily ⚡️
Home Page: https://myapi-template.herokuapp.com/api
License: MIT License
A template to create awesome APIs easily ⚡️
Home Page: https://myapi-template.herokuapp.com/api
License: MIT License
If I run command npm run build
, I get following error:
`src/controllers/user.controller.ts:102:5 - error TS2322: Type 'IUser[]' is not assignable to type 'User[]'.
Type 'IUser' is not assignable to type 'User'.
102 return users
~~~~~~~~~~~~
src/repositories/user/user.service.ts:88:38 - error TS2345: Argument of type 'IUser' is not assignable to parameter of type 'User'.
Property 'roleId' is missing in type 'IUser' but required in type 'User'.
88 const newUser = this.preloadUser(user)
~~~~
src/models/user.ts:114:3
114 roleId!: number
~~~~~~
'roleId' is declared here.
src/repositories/user/user.service.ts:129:38 - error TS2345: Argument of type 'IUser' is not assignable to parameter of type 'User'.
129 const newUser = this.preloadUser(user)
~~~~
src/repositories/user/user.service.ts:158:5 - error TS2322: Type '{ roleId: string; documentTypeId: string; id: string; firstName: string; lastName: string; birthdate?: string; address?: string; email: string; password?: string; phoneNumber?: string; termsAndConditions?: boolean; ... 4 more ...; documentType: DocumentType; }' is not assignable to type 'User'.
Types of property 'roleId' are incompatible.
Type 'string' is not assignable to type 'number'.
158 return newUser
~~~~~~~~~~~~~~
Found 4 error(s).`
I suggest to you add an env example
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.