Type Alias IsAny<T>

IsAny<T>: 0 extends 1 & T
    ? true
    : false

Checks if type T is the any type.

Type Parameters

  • T

    The type to check if it is the any type.

import { assertType, IsAny } from "@std/testing/types";

assertType<IsAny<any>>(true);
assertType<IsAny<unknown>>(false);