Library API
    Preparing search index...

    Function looseIndex

    • helper to define objects with fixed literal properties
      and a loose index signature for further extensions.

      Type Parameters

      • K extends PropertyKey = string
      • V = any

      Returns <const T extends object>(obj: T | (() => T)) => Extend<T, K, V>

      const obj = looseIndex<string,string>()({ foo: 'bar', bar: 'foo' });
      type obj = typeof obj
    • helper to define objects with fixed literal properties
      and a loose index signature for further extensions.

      Type Parameters

      • const T extends object

      Parameters

      • obj: T | (() => T)

      Returns Extend<T, string, any>

      const obj = looseIndex<string,string>()({ foo: 'bar', bar: 'foo' });
      type obj = typeof obj
    Index

    Properties

    stringString: <const T extends object>(
        obj: T | (() => T),
    ) => Extend<T, string, string>

    loose object with string keys and string values

    stringSymbol: <const T extends object>(
        obj: T | (() => T),
    ) => Extend<T, string, symbol>

    loose object with symbols values

    symbolRegExp: <const T extends object>(
        obj: T | (() => T),
    ) => Extend<T, symbol, RegExp>

    loose object with symbol keys and RegExp values

    symbolString: <const T extends object>(
        obj: T | (() => T),
    ) => Extend<T, symbol, string>

    loose object with symbol keys and string values