Skip to content

emptyArray

ts
function emptyArray<T>(): T[]

Returns an empty array of the specified type T.

Samples

ts
import { emptyArray } from 'kotlinic'

const array = emptyArray<number>()
console.log(array.length) // 0

Released under the MIT License.