You're viewing archived documentation for @imqueue/rpc v1.17.1. APIs may differ from the current release. View the latest version ↗

indexed() function

Implements '@indexed' decorator factory This is used to specify complex service types which are need to expose types containing indexed definition, for example:

Signature:

export declare function indexed(indexTypedef: string | Thunk): any;

Parameters

Parameter

Type

Description

indexTypedef

string | Thunk

Returns:

any

Example

~~~typescript import { type } from '@imqueue/rpc';

@indexed('[fieldName: string]: any') class Schema { [fieldName: string]: any } ~~~

{(constructor: Function) => void}