@starbeam/verify
Advanced tools
Comparing version 0.5.3 to 0.5.4
# @starbeam/verify | ||
## 0.5.4 | ||
### Patch Changes | ||
- The 0.5.3 release was missing dists | ||
## 0.5.3 | ||
@@ -4,0 +10,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"main": "dist/index.cjs", | ||
"version": "0.5.3", | ||
"version": "0.5.4", | ||
"dependencies": {}, | ||
@@ -8,0 +8,0 @@ "types": "dist/index.d.ts", |
@@ -63,5 +63,8 @@ import { expected } from "../verify.js"; | ||
export function hasLength<L extends number>(length: L) { | ||
function has<T>(value: T[]): value is FixedArray<T, L>; | ||
function has<T>(value: readonly T[]): value is ReadonlyFixedArray<T, L>; | ||
interface HasLength<L extends number> { | ||
<T>(value: T[]): value is FixedArray<T, L>; | ||
<T>(value: readonly T[]): value is ReadonlyFixedArray<T, L>; | ||
} | ||
export function hasLength<L extends number>(length: L): HasLength<L> { | ||
function has<T>(value: T[] | readonly T[]): value is FixedArray<T, L> { | ||
@@ -68,0 +71,0 @@ return value.length === length; |
@@ -65,3 +65,3 @@ export class VerificationError<T = unknown> extends Error { | ||
export class Expectation<In = any> { | ||
static create(description?: string) { | ||
static create<In>(description?: string): Expectation<In> { | ||
return new Expectation(description, undefined, undefined, undefined); | ||
@@ -166,3 +166,3 @@ } | ||
when(situation: string) { | ||
when(situation: string): Expectation<In> { | ||
return new Expectation( | ||
@@ -176,3 +176,3 @@ this.#description, | ||
message(input: In) { | ||
message(input: In): string { | ||
let message = ``; | ||
@@ -179,0 +179,0 @@ |
@@ -6,5 +6,5 @@ { | ||
"dependencies": { | ||
"@starbeam/verify": "workspace:*" | ||
"@starbeam/verify": "workspace:^" | ||
}, | ||
"version": null | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
67982
23
1122
0