effect-io-ai

Package: effect
Module: PrimaryKey

PrimaryKey.isPrimaryKey

Checks whether a value implements the PrimaryKey protocol.

When to use

Use to narrow an unknown value before treating it as a PrimaryKey.

Details

This is a structural guard for the PrimaryKey.symbol property.

Gotchas

This guard does not call the method or verify that it returns a string.

See

Signature

declare const isPrimaryKey: (u: unknown) => u is PrimaryKey

Source

Since v4.0.0