Here is a version that works with both readonly and mutable tuples types and a separator.

type Join<
  TElements,
  TSeparator extends string,
> = TElements extends Readonly<[infer First, ...infer Rest]>
  ? Rest extends ReadonlyArray<string>
    ? First extends string
      ? `${First}${Rest extends [] ? '' : TSeparator}${Join<Rest, TSeparator>}`
      : never
    : never
  : '';

type MutableTuple = ["a", "b", "c"];
type MutableTupleJoined = Join<MutableTuple, " | ">;
//   ^? "a | b | c"

type ReadonlyTuple = readonly ["a", "b", "c"];
type ReadonlyTupleJoined = Join<ReadonlyTuple, " | ">;
//   ^? "a | b | c"

A readonly type often comes from const assertions e.g.

const tuple = ["a", "b", "c"] as const;
type Joined = Join<typeof tuple, " | ">;

When inlining the tuple type, it is usually mutable e.g.

type Joined = Join<["a", "b", "c"], " | ">;
Answer from nyarthan on Stack Overflow
🌐
TutorialsPoint
tutorialspoint.com › typescript › typescript_array_join.htm
TypeScript - Array join()
join() method joins all the elements of an array into a string. separator − Specifies a string to separate each element of the array. If omitted, the array elements are separated with a comma.
🌐
GeeksforGeeks
geeksforgeeks.org › typescript › typescript-array-join-method
TypeScript Array join() Method - GeeksforGeeks
July 12, 2024 - The Array.join() method in TypeScript is a built-in function used to join all the elements of an array into a single string.
Discussions

Array.join has improper typing in .d.ts file
The array.join function should only be available for arrays of strings. More on github.com
🌐 github.com
8
December 20, 2016
JavaScript/TypeScript: Concatenate string variables and string arrays with accordingly set spaces - Stack Overflow
The thought here is to treat null or undefined values as if they were empty strings, filtering them out. ... You can use destructuring to concatenate everything into a temporary array, and then use filter to remove any empty elements before calling join on the lot. More on stackoverflow.com
🌐 stackoverflow.com
How to `join` an Array of String with a prefix for each string?
How to use the join function and define a prefix for each string in the Array · I want to get as result the right string: More on community.make.com
🌐 community.make.com
2
0
August 20, 2022
Having trouble concatenating two strings in TypeScript
I am trying to concatenate two strings in TypeScript like this: More on stackoverflow.com
🌐 stackoverflow.com
🌐
DEV Community
dev.to › jrcharney › split-and-join-the-dichotomy-of-strings-and-arrays-2hb
Split and Join: The Dichotomy of Strings and Arrays - DEV Community
December 19, 2022 - Strings and Arrays are like Yin and Yang. You use .split() to split an string into an array. You use .join() to join arrays into strings.
🌐
daily.dev
daily.dev › home › blog › webdev › javascript join() method: syntax, examples & pitfalls
JavaScript join() Method: Syntax, Examples & Pitfalls | daily.dev
May 25, 2026 - The Array join() method converts arrays to strings with a custom separator. Covers syntax, handling null/undefined, performance in loops
🌐
GitHub
github.com › microsoft › TypeScript › issues › 13049
Array.join has improper typing in .d.ts file · Issue #13049 · microsoft/TypeScript
December 20, 2016 - To reproduce: class X {} let arr: X[] = []; arr.join(""); Expected behaviour: compiler error. Actual behaviour: compiler accepts. The array.join function should only be available for arrays of strings.
Author: microsoft
Find elsewhere
🌐
Ts-puzzle
ts-puzzle.com › challenge › string-join
String: Join - TypeScript Puzzle
type String1 = Join<["a", "p", "p", "l", "e"], "-">; // expected to be 'a-p-p-l-e' type String2 = Join<["Hello", "World"], " ">; // expected to be 'Hello World' type String3 = Join<["2", "2", "2"], 1>; // expected to be '21212' type String4 = Join<["o"], "u">; // expected to be 'o'
🌐
npm
npmjs.com › package › join-string
join-string - npm
November 28, 2018 - joinString is available with import joinString from 'join-string' or import { joinString } from 'join-string', based on your preference.
      » npm install join-string
    
Published: Nov 28, 2018
Version: 1.0.2
🌐
W3Schools
w3schools.com › python › ref_string_join.asp
Python String join() Method
MySQL Get Started MySQL Create Database MySQL Create Table MySQL Insert MySQL Select MySQL Where MySQL Order By MySQL Delete MySQL Drop Table MySQL Update MySQL Limit MySQL Join · MongoDB Get Started MongoDB Create DB MongoDB Collection MongoDB Insert MongoDB Find MongoDB Query MongoDB Sort MongoDB Delete MongoDB Drop Collection MongoDB Update MongoDB Limit ... Python Overview Python Built-in Functions Python String Methods Python List Methods Python Dictionary Methods Python Tuple Methods Python Set Methods Python File Methods Python Keywords Python Exceptions Python Glossary
🌐
Board Infinity
boardinfinity.com › blog › array-join-in-javascript
Array Join() in JavaScript | Board Infinity
January 2, 2025 - Mutability Misconception: Something that most developers get confused with is that join() does not adopt the first array. Separator Restrictions: With a separator any type of data can be handled but bad usage (like very long separators) makes the string illegible.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › TypedArray › join
TypedArray.prototype.join() - JavaScript | MDN
The join() method of TypedArray instances returns a new string that is the concatenation of all elements in this typed array, separated by commas or a specified separator string. If the typed array has only one item, that item's stringification is returned without using the separator.
🌐
TypeScript
typescriptlang.org › docs › handbook › 2 › template-literal-types.html
TypeScript: Documentation - Template Literal Types
These types come built-in to the compiler for performance and can’t be found in the .d.ts files included with TypeScript. Converts each character in the string to the uppercase version.
🌐
DevCamp
devcamp.com › trails › 12 › campsites › 86 › guides › string-interpolation-typescript
String Interpolation in TypeScript
var msg : string = “Jordan”; console.log(“A long message to “ + msg + “ filled with text”); console.log(`A long message to ${msg} filled with text`); So these are a couple different ways of how to use JavaScript interpellation and specifically how to use typescript based string interpellation.
🌐
CopyProgramming
copyprogramming.com › howto › string-concatenation-in-typescript
TypeScript String Concatenation: Join Array Items Efficiently in 2026 - Typescript string concatenation join array items efficiently
January 12, 2026 - TypeScript string concatenation transforms arrays or lists of items into single strings using methods like or template literals. The best approach for concatenating list items to a string is the method, which efficiently merges elements with optional separators while preserving type safety.
🌐
Pericror
pericror.com › software-qa › how-to-java-string-join-in-typescript
How to Java String join in TypeScript
June 17, 2023 - In conclusion, TypeScript provides a powerful and efficient way to join strings using the `join()` function. This function works similarly to the equivalent Java String join function, allowing developers to easily concatenate strings with a ...
🌐
Reflectoring
reflectoring.io › typescript-operators
Operators in TypeScript
August 1, 2023 - Concatenation operators in TypeScript are used to combine strings and values together. The most common concatenation operator is the plus sign (+). When used with strings, the plus sign combines them into a single string.