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