pb.expectequal
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

expectequal

Installation

npm install pb.expectequal

Requirements

  • typescript@>=5.0.0
  • tsconfig.json > "compilerOptions" > { "strict": true }
import type { Expect, Equal, NotEqual } from "pb.expectequal";

const result = JSON.stringify({});

!0 as Expect<Equal<typeof result, string>>;
!0 as Expect<NotEqual<typeof result, number>>;
import { branch } from "pb.expectequal";

void function example(): string | number | undefined {
  if (branch()) {
    return "abc";
  }

  if (branch()) {
    return 12345;
  }

  return undefined;
};

Readme

Keywords

none

Package Sidebar

Install

npm i pb.expectequal

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

2.36 kB

Total Files

5

Last publish

Collaborators

  • peterboyer