Refactor
This commit is contained in:
parent
1ce961d6c2
commit
99cdb62928
1 changed files with 338 additions and 431 deletions
|
|
@ -1,16 +0,0 @@
|
|||
import { SerializableClass } from './serializable-class';
|
||||
import { serializableMapping } from './serializable-mapping';
|
||||
|
||||
export const serializable = (type: SerializableClass): any => {
|
||||
if (!serializableMapping.get(type.name)) {
|
||||
serializableMapping.set(type.name, {
|
||||
constructor: type,
|
||||
overridden: false,
|
||||
});
|
||||
}
|
||||
|
||||
Object.defineProperty(type, '__serializable_type', { value: type.name });
|
||||
Object.defineProperty(type.prototype, '__serializable_type', { value: type.name });
|
||||
|
||||
return type;
|
||||
};
|
||||
Loading…
Reference in a new issue