@microsoft/paris
Advanced tools
Comparing version 1.4.3 to 1.5.0
import { ModelBase } from "./model.base"; | ||
import { EntityModelConfigBase } from "./entity-config-base.interface"; | ||
import { EntityId } from "../modeling/entity-id.type"; | ||
export declare class EntityModelBase<TId extends EntityId = string> extends ModelBase { | ||
id: TId; | ||
constructor(data: EntityModelConfigBase); | ||
} |
@@ -24,4 +24,4 @@ var __extends = (this && this.__extends) || (function () { | ||
__extends(EntityModelBase, _super); | ||
function EntityModelBase(data) { | ||
return _super.call(this, data) || this; | ||
function EntityModelBase() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
@@ -28,0 +28,0 @@ var _a; |
export declare class ModelBase { | ||
id?: any; | ||
$parent?: ModelBase; | ||
_init?: (entityData?: any, rawData?: any) => never; | ||
constructor(data?: any); | ||
} |
@@ -95,2 +95,7 @@ import { ModelBase } from "../config/model.base"; | ||
model = new entity.entityConstructor(modelData, rawData); | ||
if (Object.isFrozen(model) || Object.isSealed(model)) | ||
console.warn("Can't assign data to " + entity.singularName + ", since it's frozen or sealed."); | ||
Object.assign(model, modelData); | ||
if (model._init) | ||
model._init(modelData, rawData); | ||
} | ||
@@ -97,0 +102,0 @@ catch (e) { |
{ | ||
"name": "@microsoft/paris", | ||
"version": "1.4.3", | ||
"version": "1.5.0", | ||
"description": "Library for the implementation of Domain Driven Design with TypeScript + RxJS", | ||
@@ -66,3 +66,3 @@ "repository": { | ||
"intl": "^1.2.5", | ||
"jest": "^24.7.1", | ||
"jest": "^23.6.0", | ||
"json-stringify-safe": "^5.0.1", | ||
@@ -69,0 +69,0 @@ "lodash-es": "4.17.10", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
251467
5144