Skip to main content
Module

x/ts_toolbelt_unofficial/mod.ts>A.Equals

👷 TypeScript's largest type utility library, now on Deno
Latest
type alias A.Equals
import { type A } from "https://deno.land/x/ts_toolbelt_unofficial@1.1.0/mod.ts";
const { Equals } = A;

Check whether A1 is equal to A2 or not.

Examples

Example 1

import {A} from 'ts-toolbelt.ts'

type test0 = A.Equals<42 | 0, 42 | 0>                    // true
type test1 = A.Equals<{a: string}, {b: string}>          // false
type test3 = A.Equals<{a: string}, {readonly a: string}> // false

Type Parameters

A1 extends any
A2 extends any
definition: (<A>() => A extends A2 ? 1 : 0) extends (<A>() => A extends A1 ? 1 : 0) ? 1 : 0