mirror of
https://github.com/Ukendio/jecs.git
synced 2025-04-24 17:10:03 +00:00
remove commented Id/Pair types
This commit is contained in:
parent
e28a6bc819
commit
059a49132b
1 changed files with 2 additions and 18 deletions
20
jecs.d.ts
vendored
20
jecs.d.ts
vendored
|
@ -15,7 +15,7 @@ export type Id = number & {
|
|||
* indicating that the entity is intended to only store other entities.
|
||||
*/
|
||||
export type Tag = Id & {
|
||||
readonly __nominal_Tag: unique symbol,
|
||||
readonly __nominal_Tag: unique symbol;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -23,25 +23,9 @@ export type Tag = Id & {
|
|||
* This identifier is associated with `TData` data when this entity is used as a component.
|
||||
*/
|
||||
export type Entity<TData = unknown> = Tag & {
|
||||
readonly __nominal_Entity: unique symbol,
|
||||
readonly __nominal_Entity: unique symbol;
|
||||
};
|
||||
|
||||
/**
|
||||
* A pair of entities.
|
||||
*
|
||||
* `TRelationship` is the type of the predicate, `TTarget` is the type of the object, and `TData` is the type of the value (defaults to `TRelationship`)
|
||||
*/
|
||||
//export type Pair<TRelationship = unknown, TTarget = unknown, TData = TRelationship> = number & {
|
||||
// readonly __nominal_Pair: unique symbol,
|
||||
//};
|
||||
|
||||
/**
|
||||
* Either an Entity or a Pair.
|
||||
*
|
||||
* An id that can be added and removed.
|
||||
*/
|
||||
//export type Id<TData = unknown> = Entity<TData> | Pair<unknown, unknown, TData>;
|
||||
|
||||
type InferComponent<TValue> = TValue extends Entity<infer TData> ? TData : never;
|
||||
|
||||
type FlattenTuple<TItems extends any[]> = TItems extends [infer TValue] ? TValue : LuaTuple<TItems>;
|
||||
|
|
Loading…
Reference in a new issue