Skip to content

Commit

Permalink
progress
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Jan 6, 2024
1 parent 6a67ff2 commit a99d9a5
Show file tree
Hide file tree
Showing 4 changed files with 146 additions and 119 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@
},
"overrides": {
"@rollup/pluginutils": "latest",
"@starbeam-dev/compile": "github:starbeamjs/dev-compile#1fe1af7",
"@types/eslint": "$@types/eslint",
"@types/node": "$@types/node",
"eslint": "$eslint",
Expand Down
6 changes: 5 additions & 1 deletion packages/universal/debug/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import { compile } from "@starbeam-dev/compile";

export default compile(import.meta);
const config = compile(import.meta);

console.log(config);

Check failure on line 5 in packages/universal/debug/rollup.config.mjs

View workflow job for this annotation

GitHub Actions / Lint

Unexpected console statement

export default config;
23 changes: 17 additions & 6 deletions packages/universal/verify/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import { isOneOf as isOneOfDev } from "./src/assertions/multi.js";
import { hasType as hasTypeDev } from "./src/assertions/types.js";
import type { VerifyFn } from "./src/verify.js";
import { verified as verifiedDev, verify as verifyDev } from "./src/verify.js";
import {
expected as expectedDev,
verified as verifiedDev,
verify as verifyDev
} from "./src/verify.js";

const noop: unknown = () => { };

export {
exhaustive,
Expand All @@ -12,13 +20,16 @@ export {
isPresent,
isWeakKey,
} from "./src/assertions/basic.js";
export { isOneOf } from "./src/assertions/multi.js";
export { hasType, type TypeOf } from "./src/assertions/types.js";
export { type Expectation, expected, VerificationError } from "./src/verify.js";
export { type TypeOf } from "./src/assertions/types.js";
export { type Expectation, VerificationError } from "./src/verify.js";

export const expected: typeof expectedDev = import.meta.env.DEV ? expectedDev : (noop as typeof expectedDev)
export const hasType: typeof hasTypeDev = import.meta.env.DEV ? hasTypeDev : (noop as typeof hasTypeDev)
export const isOneOf: typeof isOneOfDev = import.meta.env.DEV ? isOneOfDev : (noop as typeof isOneOfDev)

export const verify: VerifyFn = import.meta.env.DEV
? verifyDev
: verifyDev.noop;
: (noop as VerifyFn);
export const verified: (typeof verifiedDev)["noop"] = import.meta.env.DEV
? verifiedDev
: verifiedDev.noop;
: (noop as typeof verifiedDev);
Loading

0 comments on commit a99d9a5

Please sign in to comment.