I know how Zig works. `type` is some type the function will return, you must look at the implementation to know what actually got returned, given the comptime arguments given to it by the caller (as I already mentioned). Where is the misunderstanding??
Well, your example seems to do something completely different, which is return an ArrayList!T rather than a type.