Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 621 Bytes

File metadata and controls

43 lines (31 loc) · 621 Bytes

typelab / assertions / IsNewableFunction

type IsNewableFunction<T> = _IsTrue<IfNewableFunction<T, true, false>>;

Checks if a given type T is a newable function type.

Type Parameters

Type Parameter Description

T

The type to be checked.

Returns

true if T is a newable function type, false otherwise.

Example

type Valid = IsNewableFunction<new () => string>; // true
type Invalid = IsNewableFunction<() => string>; // false