Immertation
    Preparing search index...

    Class Config

    Shared Immer instance with patches enabled and autoFreeze disabled

    Index

    Constructors

    Properties

    Constructors

    Properties

    id: <Type extends string>(size?: number) => Type = nanoid

    Generates a unique ID for tagging objects

    Type Declaration

      • <Type extends string>(size?: number): Type
      • Generate secure URL-friendly unique ID.

        By default, the ID will have 21 symbols to have a collision probability similar to UUID v4.

        import { nanoid } from 'nanoid'
        model.id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqL"

        Type Parameters

        • Type extends string

        Parameters

        • Optionalsize: number

          Size of the ID. The default size is 21.

        Returns Type

        A random string.

        Type The ID type to replace string with some opaque type.

    immer: Immer = ...
    tag: "κ" = ...

    String key for tagging objects