effect-io-ai

Package: effect
Module: Record

Record.keys

Retrieves the keys of a given record as an array.

Example (Getting record keys)

import { Record } from "effect"
import * as assert from "node:assert"

assert.deepStrictEqual(Record.keys({ a: 1, b: 2, c: 3 }), ["a", "b", "c"])

Signature

declare const keys: <K extends string | symbol, A>(self: ReadonlyRecord<K, A>) => Array<K & string>

Source

Since v2.0.0