///
//? Create collections of items.
//@ robust skill(2)
module TDev.RT.Create
{
//? Creates an empty collection of arbitrary type
//@ [result].writesMutable
export function Collection_of(s:IStackFrame, type_T:any): Collection
{
return new Collection(type_T)
}
//? Creates a `Ref of T` (single-field object), initialized to the default value of `T`
//@ [result].writesMutable
export function Ref_of(s:IStackFrame, type_T:any): Ref
{
var r = new Ref()
if (type_T == "string")
r._set("", s)
else if (type_T == "number")
r._set(0, s)
else if (type_T == "boolean")
r._set(false, s)
return r
}
}