FaasJS
Home
  • Guide
  • Documents
  • Starter Template
  • Changelog
  • Ecosystem

    • VS Code Plugin
    • Docker Images
  • Github
  • Contributing
  • Sponsor
  • Security
  • English
  • 简体中文
Home
  • Guide
  • Documents
  • Starter Template
  • Changelog
  • Ecosystem

    • VS Code Plugin
    • Docker Images
  • Github
  • Contributing
  • Sponsor
  • Security
  • English
  • 简体中文

Documents / @faasjs/func / FuncReturnType

Type Alias: FuncReturnType<T>

FuncReturnType<T> = T extends Func<any, any, infer R> ? R : any

Get the return type of a func

Type Parameters

T

T extends Func<any, any, any>

Example

import { useFunc, type FuncReturnType } from '@faasjs/func'

const func = useFunc(() => async () => 1)

FuncReturnType<typeof func> // => number