Skip to content

Commit 8e2d97d

Browse files
authored
fix: resolve missing decorators on shim (#6354)
Closes: #6093
1 parent 1bc5658 commit 8e2d97d

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

extra/typeorm-class-transformer-shim.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,21 @@ function makePropertyDecorator(typeFunction) {
5959

6060
// columns
6161

62-
/* export */
63-
function Column(typeOrOptions, options) {
62+
/* export */ function Column(typeOrOptions, options) {
6463
return makePropertyDecorator(typeOrOptions);
6564
}
6665
exports.Column = Column;
6766

67+
/* export */ function ViewColumn(typeOrOptions, options) {
68+
return makePropertyDecorator(typeOrOptions);
69+
}
70+
exports.ViewColumn = ViewColumn;
71+
72+
/* export */ function DeleteDateColumn(options) {
73+
return function(object, propertyName) {};
74+
}
75+
exports.DeleteDateColumn = DeleteDateColumn;
76+
6877
/* export */ function CreateDateColumn(options) {
6978
return function(object, propertyName) {};
7079
}
@@ -192,6 +201,11 @@ exports.ChildEntity = ChildEntity;
192201
}
193202
exports.Entity = Entity;
194203

204+
/* export */ function ViewEntity(options) {
205+
return function(object) {};
206+
}
207+
exports.ViewEntity = ViewEntity;
208+
195209
/* export */ function TableInheritance(type) {
196210
return function(object) {};
197211
}

extra/typeorm-model-shim.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@
2929
}
3030
exports.Column = Column;
3131

32+
/* export */ function ViewColumn(typeOrOptions, options) {
33+
return function (object, propertyName) {
34+
};
35+
}
36+
exports.ViewColumn = ViewColumn;
37+
38+
/* export */ function DeleteDateColumn(options) {
39+
return function (object, propertyName) {
40+
};
41+
}
42+
exports.DeleteDateColumn = DeleteDateColumn;
43+
3244
/* export */ function CreateDateColumn(options) {
3345
return function (object, propertyName) {
3446
};
@@ -79,6 +91,12 @@ exports.ChildEntity = ChildEntity;
7991
}
8092
exports.Entity = Entity;
8193

94+
/* export */ function ViewEntity(name, options) {
95+
return function (object) {
96+
};
97+
}
98+
exports.ViewEntity = ViewEntity;
99+
82100
/* export */ function TableInheritance(type) {
83101
return function (object) {
84102
};

0 commit comments

Comments
 (0)