Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Latest commit

 

History

History
15 lines (10 loc) · 223 Bytes

void-return.md

File metadata and controls

15 lines (10 loc) · 223 Bytes

void-return

void should be used as a return type, but not as a parameter type.

Bad:

export function f(x: string | void): undefined;

Good:

export function f(x: string | undefined): void;