2
0
mirror of https://github.com/esiur/esiur-js.git synced 2025-05-06 04:22:58 +00:00
This commit is contained in:
Esiur Project 2022-09-03 22:06:45 +03:00
parent 87e04c37ac
commit b04ff2b5a4
5 changed files with 8 additions and 8 deletions

View File

@ -172,7 +172,7 @@ export default class DataDeserializer {
let record;
if (template.definedType != null) {
record = Warehouse.createInstance(template.definedType);
record = new template.definedType();
} else {
record = new Record();
}
@ -221,7 +221,7 @@ export default class DataDeserializer {
if (template != null) {
if (template.definedType != null) {
var enumVal = Warehouse.createInstance(template.definedType);
var enumVal = new template.definedType();
enumVal.index = index;
enumVal.name = template.constants[index].name;
enumVal.value = template.constants[index].value;
@ -238,7 +238,7 @@ export default class DataDeserializer {
connection.getTemplate(classId).then((tmp) => {
if (tmp != null) {
if (tmp.definedType != null) {
var enumVal = Warehouse.createInstance(tmp.definedType);
var enumVal = new tmp.definedType();
enumVal.index = index;
enumVal.name = tmp.constants[index].name;
enumVal.value = tmp.constants[index].value;

View File

@ -132,7 +132,7 @@ export class RepresentationTypeParseResults {
export default class RepresentationType {
static getRuntimeType() {
getRuntimeType() {
let runtimeType = null;
if (IdentifierToTypeMap[this.identifier] != undefined)

View File

@ -2586,7 +2586,7 @@ export default class DistributedConnection extends IStore {
{
template = Warehouse.getTemplateByClassId(classId, TemplateType.Wrapper);
if (template?.definedType != null)
dr = new template.getDependencies(self, id, rt[1], rt[2]);
dr = new template.definedType(self, id, rt[1], rt[2]);
else
dr = new DistributedResource(self, id, rt[1], rt[2]);
}
@ -2640,7 +2640,7 @@ export default class DistributedConnection extends IStore {
});
} else {
if (resource == null) {
Warehouse.put(id.toString(), dr, this, null, template)
Warehouse.put(id.toString(), dr, self, null, template)
.then(initResource)
.error((ex) => reply.triggerError(ex));
} else {

View File

@ -244,7 +244,7 @@ export default class TypeTemplate {
if (type.prototype instanceof DistributedResource)
this.templateType = TemplateType.Wrapper;
if (type.prototype instanceof IRecord)
else if (type.prototype instanceof IRecord)
this.templateType = TemplateType.Record;
else if (type.prototype instanceof IResource)
this.templateType = TemplateType.Resource;

View File

@ -318,7 +318,7 @@ export class WH extends IEventHandler
if (type.prototype instanceof DistributedResource)
templateType = TemplateType.Wrapper;
if (type.prototype instanceof IResource)
else if (type.prototype instanceof IResource)
templateType = TemplateType.Resource;
else if (type.prototype instanceof IRecord)
templateType = TemplateType.Record;