Routine <TConfig, TArgs, TReturn>
Index
Constructors
constructor
Parameters
config: TConfig
Returns Routine<TConfig, TArgs, TReturn>
Properties
optionalreadonlybody
optionalreadonlybodyJs
Type declaration
Parameters
params: any
Returns unknown
optionalreadonlycomment
optionalreadonlydataAccess
optionalreadonlydefiner
optionalreadonlydeterministic
optionalreadonlyexpression
optionalreadonlyignoreSchemaChanges
optionalreadonlylanguage
readonlyname
readonlyparams
optionalreadonlyreturnCustomType
optionalreadonlyreturns
optionalreadonlyschema
optionalreadonlysecurity
readonlytype
Methods
staticcreate
Overrides the inferred TArgs/TReturn. Omit a generic to keep inference; pass
neverin the args slot to refine only the return type.Parameters
config: TConfig
Returns Routine<TConfig, [TArgs] extends [never] ? RoutineArgsOf<TConfig> : TArgs, [TReturn] extends [never] ? RoutineReturnOf<TConfig> : TReturn>
staticis
Parameters
item: unknown
Returns item is Routine<RoutineConfig<any>, Record<string, unknown>, void>
Stored procedure or function declaration. Register instances via the
routinesconfig option passed toMikroORM.init, then call them throughem.callRoutine(routine, args).TArgsandTReturnare inferred from the literal config, soem.callRoutineis fully typed without threading generics through the call site. Reach for Routine.create when the inferred type is too loose — typically anobjectreturn that should be a concrete shape rather thanDictionary.