Remove non-user facing types

This commit is contained in:
EncodedVenom 2024-06-15 15:10:09 -04:00
parent aa6fe8d92b
commit fc2b156e79

39
lib/index.d.ts vendored
View file

@ -1,48 +1,39 @@
type i53 = number;
type i24 = number;
type Ty = Array<i53>;
type Column = Array<unknown>;
type Archetype = {
id: number,
edges: {
[key: i53]: {
[key: number]: {
add: Archetype,
remove: Archetype,
},
},
types: Ty,
types: Array<number>,
type: string | number,
entities: Array<number>,
columns: Array<Column>,
columns: Array<Array<unknown>>,
records: { [key: number]: number },
}
type ArchetypeMap = {
cache: Array<ArchetypeRecord>,
cache: Array<number>,
first: ArchetypeMap,
second: ArchetypeMap,
parent: ArchetypeMap,
size: number,
}
type ArchetypeRecord = number;
type EntityIndex = {
dense: {
[key: i24]: i53
[key: number]: number
};
sparse: {
[key: i53]: Record
[key: number]: Record
}
}
type Record = {
archetype: Archetype,
row: number,
dense: i24,
dense: number,
componentRecord: ArchetypeMap,
}
@ -174,12 +165,12 @@ export const Wildcard: Entity;
export const w: Entity;
export const REST: Entity;
export const IS_PAIR: (e: number) => boolean;
export const ECS_ID: (e: i53) => i24;
export const ECS_PAIR: (pred: i53, obj: i53) => i53;
export const ECS_GENERATION_INC: (e: i53) => i53;
export const ECS_GENERATION: (e: i53) => i53;
export const ECS_PAIR_RELATION: <T>(entityIndex: EntityIndex, e: Entity<T>) => i53;
export const ECS_PAIR_OBJECT: <T>(entityIndex: EntityIndex, e: Entity<T>) => i53;
export const IS_PAIR: (e: Entity) => boolean;
export const ECS_ID: (e: Entity) => Entity;
export const ECS_PAIR: (pred: Entity, obj: Entity) => Entity;
export const ECS_GENERATION_INC: (e: Entity) => Entity;
export const ECS_GENERATION: (e: Entity) => Entity;
export const ECS_PAIR_RELATION: <T>(entityIndex: EntityIndex, e: Entity<T>) => Entity;
export const ECS_PAIR_OBJECT: <T>(entityIndex: EntityIndex, e: Entity<T>) => Entity;
export const getAlive: (entityIndex: EntityIndex, id: i24) => i53;
export const getAlive: (entityIndex: EntityIndex, id: Entity) => Entity;