Export type as t and use it in function