Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: move helper type to JSR #654

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions test/deps.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,7 @@ export {
export { afterEach, beforeEach, describe, it } from "jsr:@std/testing/bdd";
export { type Spy, spy, type Stub, stub } from "jsr:@std/testing/mock";
export { assertType, type IsExact } from "jsr:@std/testing/types";

/**
* Checks if the actual type `A` is assignable to the expected type `E`, and
* vice versa.
*
* ```ts
* // false because E is not assignable to A
* type P = IsMutuallyAssignable<string & RegExpMatchArray, string>;
* // false because A is not assignable to E
* type Q = IsMutuallyAssignable<string | RegExpMatchArray, string>;
* // true
* type R = IsMutuallyAssignable<string | (string & RegExpMatchArray), string>;
* ```
*/
export type IsMutuallyAssignable<A, E> = [E] extends [A]
? [A] extends [E] ? true : false
: false;
export { type IsMutuallyAssignable } from "jsr:@std/testing/unstable-types";

/**
* Collects a potentially async iterator of `Uint8Array` objects into a single
Expand Down
Loading