<K extends string, A>(self: Record<K, A>): self is Record<K, never>Determines if a mutable record is empty.
Example (Checking for an empty record)
import { Record } from "effect"
import * as assert from "node:assert"
assert.deepStrictEqual(Record.isEmptyRecord({}), true)
assert.deepStrictEqual(Record.isEmptyRecord({ a: 3 }), false)guards
Source effect/Record.ts:1902 lines
export const const isEmptyRecord: <
K extends string,
A
>(
self: Record<K, A>
) => self is Record<K, never>
Determines if a mutable record is empty.
Example (Checking for an empty record)
import { Record } from "effect"
import * as assert from "node:assert"
assert.deepStrictEqual(Record.isEmptyRecord({}), true)
assert.deepStrictEqual(Record.isEmptyRecord({ a: 3 }), false)
isEmptyRecord = <function (type parameter) K in <K extends string, A>(self: Record<K, A>): self is Record<K, never>K extends string, function (type parameter) A in <K extends string, A>(self: Record<K, A>): self is Record<K, never>A>(self: Record<K, A>self: type Record<K extends keyof any, T> = {
[P in K]: T
}
Construct a type with a set of properties K of type T
Record<function (type parameter) K in <K extends string, A>(self: Record<K, A>): self is Record<K, never>K, function (type parameter) A in <K extends string, A>(self: Record<K, A>): self is Record<K, never>A>): self: Record<K, A>self is type Record<K extends keyof any, T> = {
[P in K]: T
}
Construct a type with a set of properties K of type T
Record<function (type parameter) K in <K extends string, A>(self: Record<K, A>): self is Record<K, never>K, never> =>
var Object: ObjectConstructorProvides functionality common to all JavaScript objects.
Object.ObjectConstructor.keys(o: {}): string[] (+1 overload)Returns the names of the enumerable string properties and methods of an object.
keys(self: Record<K, A>self).Array<string>.length: numberGets or sets the length of the array. This is a number one higher than the highest index in the array.
length === 0Referenced by 5 symbols