-type component() :: {term(), term()}.
-type entity() :: {term(), [component()]}.
-type id() :: integer().
-type system() :: {mfa() | fun()}.
-type world() :: #world{name :: term(), systems :: [{term(), system()}], entities :: ets:tid(), components :: ets:tid()}.
-spec add_component(term(), term(), id(), world()) -> ok.
-spec add_components([{term(), term()}], id(), world()) -> ok.
-spec add_system(system(), world()) -> ok.
-spec add_system(system(), integer(), world()) -> ok.
-spec del_component(term(), id(), world()) -> ok.
-spec del_components([term()], id(), world()) -> ok.
-spec del_system(system(), world()) -> ok.
-spec entities(world()) -> [{id(), [term()]}].
-spec entity(id(), world()) -> {id(), [term()]} | false.
-spec foreach_component(fun(), term(), world()) -> ok.
-spec get(term(), [component()]) -> term().
-spec get(term(), [component()], term()) -> term().
-spec match_component(term(), world()) -> [entity()].
-spec match_components([term()], world()) -> [entity()].
-spec new_entity(id(), world()) -> ok.
-spec proc(world()) -> any().
-spec proc(world(), any()) -> [any()].
-spec rm_entity(id(), world()) -> ok.
-spec take(term(), [component()]) -> term() | false.
-spec take(term(), [component()], term()) -> {term(), [term()]} | term().
-spec to_map(entity()) -> map().
-spec try_component(term(), id(), world()) -> {ok, [term()]} | false.