PCG nodes and other fixes (#14)

* Various fixes

* Fix name from SettingsInterface

* Allow path lookbehind for unknown keys entity

* Subraph object name

* Several fixes

* Various fixes

* Fix colors

* Various pin types
This commit is contained in:
barsdeveloper
2023-09-14 23:07:09 +02:00
committed by GitHub
parent fd991b94b3
commit 6f674b284d
46 changed files with 994 additions and 292 deletions

View File

@@ -5,10 +5,14 @@ import Utility from "../Utility.js"
/**
* @typedef {import("../entity/IEntity.js").AnyValue} AnyValue
* @typedef {import("../entity/IEntity.js").AnyValueConstructor<*>} AnyValueConstructor
* @typedef {import("../entity/IEntity.js").EntityConstructor} EntityConstructor
*/
/**
* @template {AnyValue} T
* @typedef {import("../entity/IEntity.js").AnyValueConstructor<T>} AnyValueConstructor
*/
/** @template {AnyValue} T */
export default class Serializer {
@@ -21,7 +25,7 @@ export default class Serializer {
/** @type {(entity: AnyValue, serialized: String) => String} */
static bracketsWrapped = (entity, serialized) => `(${serialized})`
/** @param {AnyValueConstructor} entityType */
/** @param {AnyValueConstructor<T>} entityType */
constructor(
entityType,
/** @type {(entity: T, serialized: String) => String} */
@@ -148,6 +152,7 @@ export default class Serializer {
}
showProperty(entity, key) {
// @ts-expect-error
const attribute = /** @type {EntityConstructor} */(this.entityType).attributes[key]
if (attribute?.constructor === Object && attribute.ignored) {
return false