voidT
On this page

voidT

Constant in Types

The absent-value type: the return type of an fn whose body never returns a value.

import { voidT } from 'typeshade'

The signature, the description and the examples come from the compiler's own source at commit 26de7be8.

Syntax

const voidT: { readonly kind: "void"; }

Description

Return-type inference falls back to it when it finds no Return in a body, so you rarely need to write it explicitly.

In the guide

Source

src/core/ir/types.ts, line 771, at commit 26de7be8

Edit this page Report a problem