-
-
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.
* getActual() now returns a specific type instead of unknown.
* Moved TestGlobalConfiguration out of published source-code. * Test that invalid type comparisons result in compile-time errors. * Bugfix: StringValidator.toString() should not cast null to "null" if the validator contains failures.
- Loading branch information
Showing
72 changed files
with
1,114 additions
and
846 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,5 @@ module.exports = { | |
exclude: [ | ||
"**/*.d.mts" | ||
] | ||
// slow: 0 | ||
}; |
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,9 +1,9 @@ | ||
[![npm version](https://badge.fury.io/js/%40cowwoc%2Frequirements.svg)](https://badge.fury.io/js/%40cowwoc%2Frequirements) | ||
[![build-status](https://github.com/cowwoc/requirements.js/workflows/Build/badge.svg)](https://github.com/cowwoc/requirements.js/actions?query=workflow%3ABuild) | ||
|
||
# <img src="https://raw.githubusercontent.com/cowwoc/requirements.js/release-3.2.1/wiki/checklist.svg?sanitize=true" width=64 height=64 alt="checklist"> Fluent API for Design Contracts | ||
# <img src="https://raw.githubusercontent.com/cowwoc/requirements.js/release-3.2.2/wiki/checklist.svg?sanitize=true" width=64 height=64 alt="checklist"> Fluent API for Design Contracts | ||
|
||
[![API](https://img.shields.io/badge/api_docs-5B45D5.svg)](https://cowwoc.github.io/requirements.js/3.2.1/docs/api/) | ||
[![API](https://img.shields.io/badge/api_docs-5B45D5.svg)](https://cowwoc.github.io/requirements.js/3.2.2/docs/api/) | ||
[![Changelog](https://img.shields.io/badge/changelog-A345D5.svg)](wiki/Changelog.md) | ||
[![java](https://img.shields.io/badge/other%20languages-java-457FD5.svg)](../../../requirements.java) | ||
|
||
|
@@ -17,13 +17,13 @@ A [fluent API](https://en.wikipedia.org/wiki/Fluent_interface) for enforcing | |
To get started, add this dependency: | ||
|
||
```shell | ||
npm install --save @cowwoc/[email protected].1 | ||
npm install --save @cowwoc/[email protected].2 | ||
``` | ||
|
||
or [pnpm](https://pnpm.io/): | ||
|
||
```shell | ||
pnpm add @cowwoc/[email protected].1 | ||
pnpm add @cowwoc/[email protected].2 | ||
``` | ||
|
||
The contents of the API classes depend on which [modules](wiki/Supported_Libraries.md) are enabled. | ||
|
@@ -67,13 +67,13 @@ Actual: 15 | |
The best way to learn about the API is using your IDE's auto-complete engine. | ||
There are six entry points you can navigate from: | ||
|
||
* [requireThat(value, name)](https://cowwoc.github.io/requirements.js/3.2.1/docs/api/module-DefaultRequirements.html#~requireThat) | ||
* [validateThat(value, name)](https://cowwoc.github.io/requirements.js/3.2.1/docs/api/module-DefaultRequirements.html#~validateThat) | ||
* [assertThat(Function)](https://cowwoc.github.io/requirements.js/3.2.1/docs/api/module-DefaultRequirements.html#~assertThat) | ||
* [assertThatAndReturn(Function)](https://cowwoc.github.io/requirements.js/3.2.1/docs/api/module-DefaultRequirements.html#~assertThatAndReturn) | ||
* [requireThat(value, name)](https://cowwoc.github.io/requirements.js/3.2.2/docs/api/module-DefaultRequirements.html#~requireThat) | ||
* [validateThat(value, name)](https://cowwoc.github.io/requirements.js/3.2.2/docs/api/module-DefaultRequirements.html#~validateThat) | ||
* [assertThat(Function)](https://cowwoc.github.io/requirements.js/3.2.2/docs/api/module-DefaultRequirements.html#~assertThat) | ||
* [assertThatAndReturn(Function)](https://cowwoc.github.io/requirements.js/3.2.2/docs/api/module-DefaultRequirements.html#~assertThatAndReturn) | ||
|
||
* [Requirements](https://cowwoc.github.io/requirements.js/3.2.1/docs/api/module-Requirements-Requirements.html) | ||
* [GlobalRequirements](https://cowwoc.github.io/requirements.js/3.2.1/docs/api/module-GlobalRequirements-GlobalRequirements.html) | ||
* [Requirements](https://cowwoc.github.io/requirements.js/3.2.2/docs/api/module-Requirements-Requirements.html) | ||
* [GlobalRequirements](https://cowwoc.github.io/requirements.js/3.2.2/docs/api/module-GlobalRequirements-GlobalRequirements.html) | ||
|
||
## Best practices | ||
|
||
|
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
Oops, something went wrong.