Skip to content

Commit

Permalink
try this
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Apr 29, 2024
1 parent 40a79ef commit e2a724b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
18 changes: 0 additions & 18 deletions packages/universal/verify/src/assertions/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ export function isPresent<T>(value: T): value is Exclude<T, null | undefined> {
return value !== null && value !== undefined;
}

expected.associate(isPresent, expected.toBe("present"));

export function exhaustive(_value: never, type?: string): never {
if (type) {
throw Error(`unexpected types left in ${type}`);
Expand Down Expand Up @@ -66,26 +64,12 @@ export function isObject(value: unknown): value is object {
return typeof value === "object" && value !== null;
}

expected.associate(
isObject,
expected
.toBe("an object")
.butGot((value) => (value === null ? "null" : typeof value)),
);

export function isWeakKey(value: unknown): value is Record<string, unknown> {
return (
(typeof value === "object" || typeof value === "function") && value !== null
);
}

expected.associate(
isWeakKey,
expected
.toBe("an object or function")
.butGot((value) => (value === null ? "null" : typeof value)),
);

interface HasLength<L extends number> {
<T>(value: T[]): value is FixedArray<T, L>;
<T>(value: T[] | readonly T[]): value is ReadonlyFixedArray<T, L>;
Expand All @@ -107,8 +91,6 @@ export const hasItems = isPresentArray;
// return value.length > 0;
// }

expected.associate(hasItems, expected.toHave(`at least one item`));

export function isNullable<In, Out extends In>(
verifier: (value: In) => value is Out,
): (value: In | null) => value is Out | null {
Expand Down
3 changes: 2 additions & 1 deletion workspace/dev-compile/src/rollup/rollup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ function compilePackage(pkg: PackageInfo, options: CompileOptions): RollupOption
comments: false
},
// prevent any compression
compress: false
compress: false,
mangle: false,
}),
] : [])
],
Expand Down

0 comments on commit e2a724b

Please sign in to comment.