Comments (3)
Hello @thomasgazzoni, I write some test code for this issue:
./IStudent.ts
import { Entity } from '../../src/Entity';
import { Column } from '../../src/decorators/Column';
export interface IStudent {
id: number;
name: string;
age: number;
}
Student.ts
@Entity
export class Student implements IStudent {
id: number;
@Column({
type: 'string',
limit: [6, 10],
})
name: string;
@Column({
type: 'number',
limit: [6, 12]
})
age: number;
}
and it works. the Entity decorator will override the ID property in child class.
from parrot.
Great, so we will have more type checking in Entity class as well.
We can close this issue then.
from parrot.
from parrot.
Related Issues (16)
- rewrite type decorators
- implement post put and delete request methods
- pack and publish to npm HOT 2
- test case: utils
- test case: decorators
- test case: Entity
- test case: relations
- test case: storage
- test case: DataBase
- test case: middleware
- add: auth middleware to handle token, login, register HOT 3
- rename project to parrot
- Using config.outDir Instead of config.include
- add type validation in post/put/patch request
- add new Column Type: image, date, name, address, url, fixed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parrot.