import { describe, it } from "vitest"; import { AssertFalse, Expect, Test, } from "inferred-types/types"; import { IsNonVariant } from "~"; import { AssertTrue } from "inferred-types"; describe("IsNonVariant", () => { it("wide tokens", () => { type F1 = IsNonVariant; type F2 = IsNonVariant; type F3 = IsNonVariant; type cases = [ Expect>, Expect>, Expect>, ]; }); it("literal tokens", () => { type T1 = IsNonVariant<`"foo"`>; type T1b = IsNonVariant<"foo">; type T2 = IsNonVariant<`42`>; type T3 = IsNonVariant<`null`>; type T4 = IsNonVariant<42>; type cases = [ Expect>, Expect>, Expect>, Expect>, Expect>, ]; }); it("union tokens", () => { type F1 = IsNonVariant<`"foo" | "bar"`>; type F2 = IsNonVariant<`"foo" | 42`>; type F3 = IsNonVariant<42 | undefined>; type cases = [ Expect>, Expect>, Expect>, ]; }); it("non-token literal", () => { type T1 = IsNonVariant<"foo">; type T2 = IsNonVariant<42>; type cases = [ Expect>, Expect>, ]; }); });