1 | "use strict";
|
2 | var __importDefault = (this && this.__importDefault) || function (mod) {
|
3 | return (mod && mod.__esModule) ? mod : { "default": mod };
|
4 | };
|
5 | Object.defineProperty(exports, "__esModule", { value: true });
|
6 | const types_1 = __importDefault(require("../types"));
|
7 | exports.ENTITY_INSTANCE_TYPE = "EntityComponent";
|
8 | ;
|
9 |
|
10 |
|
11 |
|
12 | exports.default = (props) => {
|
13 |
|
14 | const componentProps = {
|
15 | infrastructureType: types_1.default.INFRASTRUCTURE_TYPE_COMPONENT,
|
16 | instanceType: exports.ENTITY_INSTANCE_TYPE,
|
17 | instanceId: props.id
|
18 | };
|
19 | return Object.assign(componentProps, props);
|
20 | };
|
21 | exports.isEntity = (component) => {
|
22 | return component !== undefined && component.instanceType === exports.ENTITY_INSTANCE_TYPE;
|
23 | };
|
24 |
|
\ | No newline at end of file |