local w=require(script.Parent.Parent.Shared.t)local O={}O.ComponentDefinition=w.interface({name=w.string;reducer=w.optional(w.callback);check=w.optional(w.callback),defaults=w.optional(w.map(w.string,w.any));components=w.optional(w.map(w.string,w.any));tag=w.optional(w.string);entityCheck=w.optional(w.union(w.array(w.string),w.callback)),chainingEvents=w.optional(w.array(w.string));data=w.none;lastData=w.none,set=w.none;get=w.none;getOr=w.none,getAnd=w.none,dispatch=w.none;listen=w.none;removeListener=w.none;_listeners=w.none,instance=w.none;onAdded=w.optional(w.callback),onUpdated=w.optional(w.callback);onParentUpdated=w.optional(w.callback),onRemoved=w.optional(w.callback),shouldUpdate=w.optional(w.callback),initialize=w.optional(w.callback);destroy=w.optional(w.callback)})O.StaticAggregate=w.intersection(w.ComponentDefinition,w.interface({new=w.callback}))O.ComponentAggregate=w.interface({components=w.table;data=w.table;instance=w.Instance})O.ComponentResolvable=w.union(w.string,O.StaticAggregate)return O
local t = require(script.Parent.Parent.Shared.t)

local Types = {}

Types.ComponentDefinition = t.interface({
	name = t.string;
	reducer = t.optional(t.callback);
	check = t.optional(t.callback);
	defaults = t.optional(t.map(t.string, t.any));
	components = t.optional(t.map(t.string, t.any));
	tag = t.optional(t.string);
	entityCheck = t.optional(t.union(t.array(t.string), t.callback));
	chainingEvents = t.optional(t.array(t.string));

	data = t.none;
	lastData = t.none;
	set = t.none;
	get = t.none;
	getOr = t.none;
	getAnd = t.none;
	dispatch = t.none;
	listen = t.none;
	removeListener = t.none;
	_listeners = t.none;
	instance = t.none;

	onAdded = t.optional(t.callback);
	onUpdated = t.optional(t.callback);
	onParentUpdated = t.optional(t.callback);
	onRemoved = t.optional(t.callback);
	shouldUpdate = t.optional(t.callback);
	initialize = t.optional(t.callback);
	destroy = t.optional(t.callback);
})

Types.StaticAggregate = t.intersection(t.ComponentDefinition, t.interface({
	new = t.callback;
}))

Types.ComponentAggregate = t.interface({
	components = t.table;
	data = t.table;
	instance = t.Instance;
})

Types.ComponentResolvable = t.union(t.string, Types.StaticAggregate)

return Types
