Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 419 Bytes

README.md

File metadata and controls

31 lines (21 loc) · 419 Bytes

Return

A helper to get the Return Type of the function.

Usage

Generic

import type {Return} from 'flown'

declare function someFunction(string): string

/**
 * string
 */
type ReturnType = Return<typeof someFunction>

Function

import type {_Return} from 'flown'

declare function someFunction(string): string

/**
 * string
 */
type ReturnType = $Call<_Return, typeof someFunction>