Skip to Content
typesConcatenate

Concatenate

See source on Github

Concatenates an array of string | number types into a single string. Accepts an optional separator S to separate each string.

Example

type Test = Concatenate<['hello', 'world'], ' '>; // 'hello world' type Test2 = Concatenate<['category', 'red-riding-hoodie'], '/'>; // 'category/red-riding-hoodie'