-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
57 changed files
with
125 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import { email } from "@assertions/email"; | ||
import type { Email } from "@assertions/email/types"; | ||
import type { Assertion } from "@the-minimal/types"; | ||
import { assertType } from "vitest"; | ||
|
||
assertType<Assertion<string>>(email); | ||
assertType<Assertion<Email>>(email); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import { endsWith } from "@assertions/endsWith"; | ||
import type { EndsWith } from "@assertions/endsWith/types"; | ||
import type { Assertion } from "@the-minimal/types"; | ||
import { assertType } from "vitest"; | ||
|
||
assertType<Assertion<string>>(endsWith("?")); | ||
assertType<Assertion<EndsWith<"?">>>(endsWith("?")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import type { Brand } from "@the-minimal/types"; | ||
|
||
export type EndsWith<$Value> = Brand<"EndsWith", $Value>; | ||
export type EndsWith<$Input> = Brand<"EndsWith", $Input>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export type Message = (error: any, value: unknown) => string; | ||
export type Message = (error: any, input: unknown) => string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import { includes } from "@assertions/includes"; | ||
import type { Includes } from "@assertions/includes/types"; | ||
import type { Assertion } from "@the-minimal/types"; | ||
import { assertType } from "vitest"; | ||
|
||
assertType<Assertion<string>>(includes("hello")); | ||
assertType<Assertion<Includes<"string">>>(includes("hello")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import type { Brand } from "@the-minimal/types"; | ||
|
||
export type Includes<$Value> = Brand<"Includes", $Value>; | ||
export type Includes<$Input> = Brand<"Includes", $Input>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import type { Integer } from "@assertions/integer/types"; | ||
import type { Assertion } from "@the-minimal/types"; | ||
import { assertType } from "vitest"; | ||
import { integer } from "."; | ||
|
||
assertType<Assertion<number>>(integer); | ||
assertType<Assertion<Integer>>(integer); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
import { length } from "@assertions/length"; | ||
import type { Length } from "@assertions/length/types"; | ||
import type { Assertion } from "@the-minimal/types"; | ||
import { assertType } from "vitest"; | ||
|
||
assertType<{ length: number }>(length(2)); | ||
assertType<Assertion<Length<2>>>(length(2)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import type { Brand } from "@the-minimal/types"; | ||
|
||
export type Length<$Value extends number> = Brand<"Length", $Value>; | ||
export type Length<$Input extends number> = Brand<"Length", $Input>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
import { maxLength } from "@assertions/maxLength"; | ||
import type { MaxLength } from "@assertions/maxLength/types"; | ||
import type { Assertion } from "@the-minimal/types"; | ||
import { assertType } from "vitest"; | ||
|
||
assertType<{ length: number }>(maxLength(2)); | ||
assertType<Assertion<MaxLength<2>>>(maxLength(2)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import type { Brand } from "@the-minimal/types"; | ||
|
||
export type MaxLength<$Value extends number> = Brand<"MaxLength", $Value>; | ||
export type MaxLength<$Input extends number> = Brand<"MaxLength", $Input>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
import { maxValue } from "@assertions/maxValue"; | ||
import type { MaxValue } from "@assertions/maxValue/types"; | ||
import type { Assertion } from "@the-minimal/types"; | ||
import { assertType } from "vitest"; | ||
|
||
assertType<unknown>(maxValue(17)); | ||
assertType<Assertion<MaxValue<17>>>(maxValue(17)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import type { Brand } from "@the-minimal/types"; | ||
|
||
export type MaxValue<$Value> = Brand<"MaxValue", $Value>; | ||
export type MaxValue<$Input> = Brand<"MaxValue", $Input>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
import { minLength } from "@assertions/minLength"; | ||
import type { MinLength } from "@assertions/minLength/types"; | ||
import type { Assertion } from "@the-minimal/types"; | ||
import { assertType } from "vitest"; | ||
|
||
assertType<{ length: number }>(minLength(2)); | ||
assertType<Assertion<MinLength<2>>>(minLength(2)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import type { Brand } from "@the-minimal/types"; | ||
|
||
export type MinLength<$Value extends number> = Brand<"MinLength", $Value>; | ||
export type MinLength<$Input extends number> = Brand<"MinLength", $Input>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
import { minValue } from "@assertions/minValue"; | ||
import type { MinValue } from "@assertions/minValue/types"; | ||
import type { Assertion } from "@the-minimal/types"; | ||
import { assertType } from "vitest"; | ||
|
||
assertType<unknown>(minValue(18)); | ||
assertType<Assertion<MinValue<18>>>(minValue(18)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import type { Brand } from "@the-minimal/types"; | ||
|
||
export type MinValue<$Value> = Brand<"MinValue", $Value>; | ||
export type MinValue<$Input> = Brand<"MinValue", $Input>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
import { notLength } from "@assertions/notLength"; | ||
import type { NotLength } from "@assertions/notLength/types"; | ||
import type { Assertion } from "@the-minimal/types"; | ||
import { assertType } from "vitest"; | ||
|
||
assertType<{ length: number }>(notLength(2)); | ||
assertType<Assertion<NotLength<2>>>(notLength(2)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import type { Brand } from "@the-minimal/types"; | ||
|
||
export type NotLength<$Value extends number> = Brand<"NotLength", $Value>; | ||
export type NotLength<$Input extends number> = Brand<"NotLength", $Input>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import { notValue } from "@assertions/notValue"; | ||
import type { NotValue } from "@assertions/notValue/types"; | ||
import type { Assertion } from "@the-minimal/types"; | ||
import { assertType } from "vitest"; | ||
|
||
assertType<Assertion<number>>(notValue(2)); | ||
assertType<Assertion<NotValue<2>>>(notValue(2)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import type { Brand } from "@the-minimal/types"; | ||
|
||
export type NotValue<$Value> = Brand<"NotValue", $Value>; | ||
export type NotValue<$Input> = Brand<"NotValue", $Input>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.