Documents / @faasjs/types / InferFaasJob
Type Alias: InferFaasJob<TJob>
InferFaasJob<
TJob> > > > > =TJobextendsobject?object:TJobextendsobject?TDefaultextendsobject?object:never:never
Infer { Params } from a FaasJS job definition or a module whose default
export is a FaasJS job definition.
Type Parameters
TJob
TJob
A Job object or module with a default Job export.
Returns
An object containing the job params type, or never when inference fails.
Example
import type { InferFaasJob } from '@faasjs/types'
import type * as syncJob from './features/users/jobs/sync.job'
type SyncJob = InferFaasJob<typeof syncJob>
// → { Params: { userId: string } }