idb-ts
    Preparing search index...

    Function Index

    • Property decorator that creates an IndexedDB index on the decorated field, enabling efficient lookups via EntityRepository.findByIndex and EntityRepository.findOneByIndex.

      Parameters

      • Optionaloptions: IDBIndexParameters

        Standard IDBIndexParameters (e.g., { unique: true }).

      Returns PropertyDecorator

      @DataClass()
      class User {
      @KeyPath()
      id!: string;

      @Index({ unique: true })
      email!: string;

      @Index()
      department!: string;
      }