hein 1.4.2 → 2.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/ESM_MIGRATION_NOTES.md +6 -0
- package/README.md +46 -7
- package/dist/assert-9EsvfQwn.d.cts +483 -0
- package/dist/assert-9EsvfQwn.d.cts.map +1 -0
- package/dist/assert-B_vcZS90.d.ts +481 -0
- package/dist/assert-B_vcZS90.d.ts.map +1 -0
- package/dist/assert-DZjgWjOw.cjs +1626 -0
- package/dist/assert-DZjgWjOw.cjs.map +1 -0
- package/dist/assert-kFXp7i_B.js +1260 -0
- package/dist/assert-kFXp7i_B.js.map +1 -0
- package/dist/assert.cjs +53 -0
- package/dist/assert.d.cts +3 -0
- package/dist/assert.d.ts +3 -27
- package/dist/assert.js +3 -84
- package/dist/chunk-CTAAG5j7.js +13 -0
- package/dist/expect.types-DPl6xY56.d.ts +99 -0
- package/dist/expect.types-DPl6xY56.d.ts.map +1 -0
- package/dist/expect.types-s8icgWp5.d.cts +99 -0
- package/dist/expect.types-s8icgWp5.d.cts.map +1 -0
- package/dist/expect.types.cjs +0 -0
- package/dist/expect.types.d.cts +3 -0
- package/dist/expect.types.d.ts +3 -66
- package/dist/expect.types.js +1 -4
- package/dist/index.cjs +596 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +16 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +15 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +573 -27
- package/dist/index.js.map +1 -1
- package/dist/throws-BrCCeBBl.d.ts +42 -0
- package/dist/throws-BrCCeBBl.d.ts.map +1 -0
- package/dist/throws-D7JsW4NM.d.cts +40 -0
- package/dist/throws-D7JsW4NM.d.cts.map +1 -0
- package/eslint.config.mjs +13 -0
- package/package.json +31 -18
- package/tsdown.config.ts +9 -0
- package/dist/assert/deep-equal.d.ts +0 -2
- package/dist/assert/deep-equal.d.ts.map +0 -1
- package/dist/assert/deep-equal.js +0 -26
- package/dist/assert/deep-equal.js.map +0 -1
- package/dist/assert/deep-has-property.d.ts +0 -20
- package/dist/assert/deep-has-property.d.ts.map +0 -1
- package/dist/assert/deep-has-property.js +0 -50
- package/dist/assert/deep-has-property.js.map +0 -1
- package/dist/assert/ends-with.d.ts +0 -11
- package/dist/assert/ends-with.d.ts.map +0 -1
- package/dist/assert/ends-with.js +0 -30
- package/dist/assert/ends-with.js.map +0 -1
- package/dist/assert/equal.d.ts +0 -9
- package/dist/assert/equal.d.ts.map +0 -1
- package/dist/assert/equal.js +0 -21
- package/dist/assert/equal.js.map +0 -1
- package/dist/assert/greater-than-equal.d.ts +0 -9
- package/dist/assert/greater-than-equal.d.ts.map +0 -1
- package/dist/assert/greater-than-equal.js +0 -20
- package/dist/assert/greater-than-equal.js.map +0 -1
- package/dist/assert/greater-than.d.ts +0 -9
- package/dist/assert/greater-than.d.ts.map +0 -1
- package/dist/assert/greater-than.js +0 -20
- package/dist/assert/greater-than.js.map +0 -1
- package/dist/assert/has-keys.d.ts +0 -14
- package/dist/assert/has-keys.d.ts.map +0 -1
- package/dist/assert/has-keys.js +0 -47
- package/dist/assert/has-keys.js.map +0 -1
- package/dist/assert/has-members.d.ts +0 -46
- package/dist/assert/has-members.d.ts.map +0 -1
- package/dist/assert/has-members.js +0 -58
- package/dist/assert/has-members.js.map +0 -1
- package/dist/assert/has-property.d.ts +0 -20
- package/dist/assert/has-property.d.ts.map +0 -1
- package/dist/assert/has-property.js +0 -47
- package/dist/assert/has-property.js.map +0 -1
- package/dist/assert/has-size.d.ts +0 -40
- package/dist/assert/has-size.d.ts.map +0 -1
- package/dist/assert/has-size.js +0 -68
- package/dist/assert/has-size.js.map +0 -1
- package/dist/assert/in-ballpark.d.ts +0 -14
- package/dist/assert/in-ballpark.d.ts.map +0 -1
- package/dist/assert/in-ballpark.js +0 -26
- package/dist/assert/in-ballpark.js.map +0 -1
- package/dist/assert/includes.d.ts +0 -22
- package/dist/assert/includes.d.ts.map +0 -1
- package/dist/assert/includes.js +0 -32
- package/dist/assert/includes.js.map +0 -1
- package/dist/assert/instance-of.d.ts +0 -13
- package/dist/assert/instance-of.d.ts.map +0 -1
- package/dist/assert/instance-of.js +0 -35
- package/dist/assert/instance-of.js.map +0 -1
- package/dist/assert/is-after.d.ts +0 -9
- package/dist/assert/is-after.d.ts.map +0 -1
- package/dist/assert/is-after.js +0 -27
- package/dist/assert/is-after.js.map +0 -1
- package/dist/assert/is-before.d.ts +0 -9
- package/dist/assert/is-before.d.ts.map +0 -1
- package/dist/assert/is-before.js +0 -27
- package/dist/assert/is-before.js.map +0 -1
- package/dist/assert/is-between.d.ts +0 -13
- package/dist/assert/is-between.d.ts.map +0 -1
- package/dist/assert/is-between.js +0 -38
- package/dist/assert/is-between.js.map +0 -1
- package/dist/assert/is-empty.d.ts +0 -29
- package/dist/assert/is-empty.d.ts.map +0 -1
- package/dist/assert/is-empty.js +0 -48
- package/dist/assert/is-empty.js.map +0 -1
- package/dist/assert/is-type.d.ts +0 -94
- package/dist/assert/is-type.d.ts.map +0 -1
- package/dist/assert/is-type.js +0 -32
- package/dist/assert/is-type.js.map +0 -1
- package/dist/assert/less-than-equal.d.ts +0 -9
- package/dist/assert/less-than-equal.d.ts.map +0 -1
- package/dist/assert/less-than-equal.js +0 -27
- package/dist/assert/less-than-equal.js.map +0 -1
- package/dist/assert/less-than.d.ts +0 -9
- package/dist/assert/less-than.d.ts.map +0 -1
- package/dist/assert/less-than.js +0 -20
- package/dist/assert/less-than.js.map +0 -1
- package/dist/assert/match.d.ts +0 -13
- package/dist/assert/match.d.ts.map +0 -1
- package/dist/assert/match.js +0 -29
- package/dist/assert/match.js.map +0 -1
- package/dist/assert/rejects.d.ts +0 -33
- package/dist/assert/rejects.d.ts.map +0 -1
- package/dist/assert/rejects.js +0 -48
- package/dist/assert/rejects.js.map +0 -1
- package/dist/assert/round-to.d.ts +0 -13
- package/dist/assert/round-to.d.ts.map +0 -1
- package/dist/assert/round-to.js +0 -43
- package/dist/assert/round-to.js.map +0 -1
- package/dist/assert/starts-with.d.ts +0 -12
- package/dist/assert/starts-with.d.ts.map +0 -1
- package/dist/assert/starts-with.js +0 -30
- package/dist/assert/starts-with.js.map +0 -1
- package/dist/assert/throws.d.ts +0 -33
- package/dist/assert/throws.d.ts.map +0 -1
- package/dist/assert/throws.js +0 -40
- package/dist/assert/throws.js.map +0 -1
- package/dist/assert.d.ts.map +0 -1
- package/dist/assert.js.map +0 -1
- package/dist/expect/after.d.ts +0 -11
- package/dist/expect/after.d.ts.map +0 -1
- package/dist/expect/after.js +0 -18
- package/dist/expect/after.js.map +0 -1
- package/dist/expect/ballpark.d.ts +0 -12
- package/dist/expect/ballpark.d.ts.map +0 -1
- package/dist/expect/ballpark.js +0 -18
- package/dist/expect/ballpark.js.map +0 -1
- package/dist/expect/before.d.ts +0 -11
- package/dist/expect/before.d.ts.map +0 -1
- package/dist/expect/before.js +0 -18
- package/dist/expect/before.js.map +0 -1
- package/dist/expect/between.d.ts +0 -21
- package/dist/expect/between.d.ts.map +0 -1
- package/dist/expect/between.js +0 -18
- package/dist/expect/between.js.map +0 -1
- package/dist/expect/empty.d.ts +0 -16
- package/dist/expect/empty.d.ts.map +0 -1
- package/dist/expect/empty.js +0 -18
- package/dist/expect/empty.js.map +0 -1
- package/dist/expect/end-with.d.ts +0 -12
- package/dist/expect/end-with.d.ts.map +0 -1
- package/dist/expect/end-with.js +0 -18
- package/dist/expect/end-with.js.map +0 -1
- package/dist/expect/eql.d.ts +0 -11
- package/dist/expect/eql.d.ts.map +0 -1
- package/dist/expect/eql.js +0 -22
- package/dist/expect/eql.js.map +0 -1
- package/dist/expect/equal-shorthand.d.ts +0 -14
- package/dist/expect/equal-shorthand.d.ts.map +0 -1
- package/dist/expect/equal-shorthand.js +0 -34
- package/dist/expect/equal-shorthand.js.map +0 -1
- package/dist/expect/equal.d.ts +0 -14
- package/dist/expect/equal.d.ts.map +0 -1
- package/dist/expect/equal.js +0 -28
- package/dist/expect/equal.js.map +0 -1
- package/dist/expect/excluding.d.ts +0 -11
- package/dist/expect/excluding.d.ts.map +0 -1
- package/dist/expect/excluding.js +0 -14
- package/dist/expect/excluding.js.map +0 -1
- package/dist/expect/greater-than-equal.d.ts +0 -32
- package/dist/expect/greater-than-equal.d.ts.map +0 -1
- package/dist/expect/greater-than-equal.js +0 -20
- package/dist/expect/greater-than-equal.js.map +0 -1
- package/dist/expect/greater-than.d.ts +0 -32
- package/dist/expect/greater-than.d.ts.map +0 -1
- package/dist/expect/greater-than.js +0 -20
- package/dist/expect/greater-than.js.map +0 -1
- package/dist/expect/has-property.d.ts +0 -36
- package/dist/expect/has-property.d.ts.map +0 -1
- package/dist/expect/has-property.js +0 -22
- package/dist/expect/has-property.js.map +0 -1
- package/dist/expect/include.d.ts +0 -25
- package/dist/expect/include.d.ts.map +0 -1
- package/dist/expect/include.js +0 -22
- package/dist/expect/include.js.map +0 -1
- package/dist/expect/instance-of-shorthand.d.ts +0 -34
- package/dist/expect/instance-of-shorthand.d.ts.map +0 -1
- package/dist/expect/instance-of-shorthand.js +0 -22
- package/dist/expect/instance-of-shorthand.js.map +0 -1
- package/dist/expect/instance-of.d.ts +0 -11
- package/dist/expect/instance-of.d.ts.map +0 -1
- package/dist/expect/instance-of.js +0 -18
- package/dist/expect/instance-of.js.map +0 -1
- package/dist/expect/keys.d.ts +0 -17
- package/dist/expect/keys.d.ts.map +0 -1
- package/dist/expect/keys.js +0 -18
- package/dist/expect/keys.js.map +0 -1
- package/dist/expect/length.d.ts +0 -28
- package/dist/expect/length.d.ts.map +0 -1
- package/dist/expect/length.js +0 -19
- package/dist/expect/length.js.map +0 -1
- package/dist/expect/less-than-equal.d.ts +0 -32
- package/dist/expect/less-than-equal.d.ts.map +0 -1
- package/dist/expect/less-than-equal.js +0 -20
- package/dist/expect/less-than-equal.js.map +0 -1
- package/dist/expect/less-than.d.ts +0 -32
- package/dist/expect/less-than.d.ts.map +0 -1
- package/dist/expect/less-than.js +0 -20
- package/dist/expect/less-than.js.map +0 -1
- package/dist/expect/match.d.ts +0 -10
- package/dist/expect/match.d.ts.map +0 -1
- package/dist/expect/match.js +0 -18
- package/dist/expect/match.js.map +0 -1
- package/dist/expect/members.d.ts +0 -20
- package/dist/expect/members.d.ts.map +0 -1
- package/dist/expect/members.js +0 -32
- package/dist/expect/members.js.map +0 -1
- package/dist/expect/reject.d.ts +0 -12
- package/dist/expect/reject.d.ts.map +0 -1
- package/dist/expect/reject.js +0 -13
- package/dist/expect/reject.js.map +0 -1
- package/dist/expect/round-to.d.ts +0 -12
- package/dist/expect/round-to.d.ts.map +0 -1
- package/dist/expect/round-to.js +0 -18
- package/dist/expect/round-to.js.map +0 -1
- package/dist/expect/start-with.d.ts +0 -12
- package/dist/expect/start-with.d.ts.map +0 -1
- package/dist/expect/start-with.js +0 -18
- package/dist/expect/start-with.js.map +0 -1
- package/dist/expect/throw.d.ts +0 -12
- package/dist/expect/throw.d.ts.map +0 -1
- package/dist/expect/throw.js +0 -13
- package/dist/expect/throw.js.map +0 -1
- package/dist/expect/type-shorthand.d.ts +0 -66
- package/dist/expect/type-shorthand.d.ts.map +0 -1
- package/dist/expect/type-shorthand.js +0 -34
- package/dist/expect/type-shorthand.js.map +0 -1
- package/dist/expect/type.d.ts +0 -10
- package/dist/expect/type.d.ts.map +0 -1
- package/dist/expect/type.js +0 -18
- package/dist/expect/type.js.map +0 -1
- package/dist/expect.d.ts +0 -33
- package/dist/expect.d.ts.map +0 -1
- package/dist/expect.js +0 -88
- package/dist/expect.js.map +0 -1
- package/dist/expect.types.d.ts.map +0 -1
- package/dist/expect.types.js.map +0 -1
- package/dist/mixins.d.ts +0 -26
- package/dist/mixins.d.ts.map +0 -1
- package/dist/mixins.js +0 -9
- package/dist/mixins.js.map +0 -1
- package/dist/utils/cast-array.d.ts +0 -2
- package/dist/utils/cast-array.d.ts.map +0 -1
- package/dist/utils/cast-array.js +0 -14
- package/dist/utils/cast-array.js.map +0 -1
- package/dist/utils/chain.d.ts +0 -3
- package/dist/utils/chain.d.ts.map +0 -1
- package/dist/utils/chain.js +0 -21
- package/dist/utils/chain.js.map +0 -1
- package/dist/utils/fail.d.ts +0 -6
- package/dist/utils/fail.d.ts.map +0 -1
- package/dist/utils/fail.js +0 -13
- package/dist/utils/fail.js.map +0 -1
- package/dist/utils/get-size.d.ts +0 -2
- package/dist/utils/get-size.d.ts.map +0 -1
- package/dist/utils/get-size.js +0 -24
- package/dist/utils/get-size.js.map +0 -1
- package/dist/utils/get-type.d.ts +0 -3
- package/dist/utils/get-type.d.ts.map +0 -1
- package/dist/utils/get-type.js +0 -17
- package/dist/utils/get-type.js.map +0 -1
- package/dist/utils/match.d.ts +0 -15
- package/dist/utils/match.d.ts.map +0 -1
- package/dist/utils/match.js +0 -150
- package/dist/utils/match.js.map +0 -1
- package/dist/utils/process-error.d.ts +0 -11
- package/dist/utils/process-error.d.ts.map +0 -1
- package/dist/utils/process-error.js +0 -98
- package/dist/utils/process-error.js.map +0 -1
- package/dist/utils/types.d.ts +0 -4
- package/dist/utils/types.d.ts.map +0 -1
- package/dist/utils/types.js +0 -3
- package/dist/utils/types.js.map +0 -1
- package/dist/utils/validate-numeric-and-dates.d.ts +0 -2
- package/dist/utils/validate-numeric-and-dates.d.ts.map +0 -1
- package/dist/utils/validate-numeric-and-dates.js +0 -15
- package/dist/utils/validate-numeric-and-dates.js.map +0 -1
- package/dist/utils/xor.d.ts +0 -2
- package/dist/utils/xor.d.ts.map +0 -1
- package/dist/utils/xor.js +0 -8
- package/dist/utils/xor.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["mixins: Record<string, Property | Method | Alias>","deepNotHasProperty","deepHasProperty","notHasProperty","hasProperty","notRejects","rejects","notThrows","throws","AssertionError"],"sources":["../src/mixins.ts","../src/utils/chain.ts","../src/utils/get-size.ts","../src/expect/after.ts","../src/expect/ballpark.ts","../src/expect/before.ts","../src/expect/between.ts","../src/expect/empty.ts","../src/expect/end-with.ts","../src/expect/eql.ts","../src/expect/equal-shorthand.ts","../src/expect/equal.ts","../src/expect/excluding.ts","../src/expect/greater-than-equal.ts","../src/expect/greater-than.ts","../src/expect/has-property.ts","../src/expect/include.ts","../src/expect/instance-of-shorthand.ts","../src/expect/instance-of.ts","../src/expect/keys.ts","../src/expect/length.ts","../src/expect/less-than-equal.ts","../src/expect/less-than.ts","../src/expect/match.ts","../src/expect/members.ts","../src/expect/reject.ts","../src/expect/round-to.ts","../src/expect/start-with.ts","../src/expect/throw.ts","../src/expect/type-shorthand.ts","../src/expect/type.ts","../src/utils/fail.ts","../src/expect.ts"],"sourcesContent":["export interface State<T> {\n inverted?: boolean;\n value?: T;\n getProperty?: (value: T) => any;\n deep?: boolean;\n same?: boolean;\n ordered?: boolean;\n partial?: boolean;\n\n every?: boolean;\n}\n\nexport interface Property {\n type: 'property';\n value: (state: State<any>) => Partial<State<any>> | null;\n}\n\ntype MethodCallback = (state: State<any>) => (...args: any[]) => void;\n\nexport interface Method {\n type: 'method';\n value: MethodCallback;\n}\n\nexport interface Alias {\n type: 'alias';\n value: string;\n}\n\nexport const mixins: Record<string, Property | Method | Alias> = {};\n\nexport const use = (plugins: Record<string, Property | Method | Alias>) => {\n Object.assign(mixins, plugins);\n};\n","export const registerProperty = <T, U extends string, V extends () => any>(object: T, name: U, value: V) => {\n Object.defineProperty(object, name, {\n enumerable: true,\n get() {\n return value();\n }\n });\n return object as T & Record<U, V>;\n};\n\nexport const registerMethod = <T, U extends string, V>(object: T, name: U, value: V) => {\n Object.defineProperty(object, name, {\n value\n });\n return object as T & Record<U, V>;\n};\n","import isPlainObject from 'lodash/isPlainObject.js';\n\nexport const getSize = (value: any) => {\n if (Array.isArray(value)) {\n return value.length;\n }\n if (isPlainObject(value)) {\n return Object.keys(value).length;\n }\n if (value instanceof Map) {\n return value.size;\n }\n if (value instanceof Set) {\n return value.size;\n }\n if (typeof value === 'string') {\n return value.length;\n }\n return 0;\n};\n","import { isAfter, notAfter } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface DateExpect {\n /**\n * check if date is after other date\n * @param date\n */\n after(date: Date): this;\n }\n}\n\nuse({\n after: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (date: Date) => {\n if (inverted) {\n notAfter(value, date);\n } else {\n isAfter(value, date);\n }\n }\n }\n});\n","import { inBallpark, notInBallpark } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface NumberExpect {\n /**\n * check if number close enough (default 10%)\n * @param ballpark\n * @param [multiplier=10] - a number between 0 and 1 (exclusive). 0.1 (default) means 10% difference is allowed.\n */\n ballpark(ballpark: number, multiplier?: number): this;\n }\n}\n\nuse({\n ballpark: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (ballpark, multiplier = 0.1) => {\n if (inverted) {\n notInBallpark(value, ballpark, multiplier);\n } else {\n inBallpark(value, ballpark, multiplier);\n }\n }\n }\n});\n","import { isBefore, notBefore } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface DateExpect {\n /**\n * check if date is before other date\n * @param date\n */\n before(date: Date): this;\n }\n}\n\nuse({\n before: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (date: Date) => {\n if (inverted) {\n notBefore(value, date);\n } else {\n isBefore(value, date);\n }\n }\n }\n});\n","import { isBetween, notBetween } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface DateExpect {\n /**\n * check if date is between other dates\n * @param start\n * @param end\n */\n between(start: Date, end: Date, inclusive?: boolean): this;\n }\n interface NumberExpect {\n /**\n * check if number is between other numbers\n * @param start\n * @param end\n * @param inclusive\n */\n between(start: number, end: number, inclusive?: boolean): this;\n }\n}\n\nuse({\n between: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (start: Date, end: Date, inclusive = true) => {\n if (inverted) {\n notBetween(value, start, end, { inclusive });\n } else {\n isBetween(value, start, end, { inclusive });\n }\n }\n }\n});\n","import { isEmpty, notIsEmpty } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ObjectExpect<T> {\n /**\n * check if object/array/Map/Set is empty\n */\n empty(message?: string): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface MapExpect<T> {\n /**\n * check if Map is empty\n */\n empty(message?: string): this;\n }\n}\n\nuse({\n empty: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (message?: string) => {\n if (inverted) {\n notIsEmpty(value, message);\n } else {\n isEmpty(value, message);\n }\n }\n }\n});\n","import { endsWith, notEndsWith } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface StringExpect {\n /**\n * check if string ends with other string\n * @param start\n * @example endsWith('foo', 'o');\n */\n endWith(end: string): this;\n }\n}\n\nuse({\n endWith: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (end: string) => {\n if (inverted) {\n notEndsWith(value, end);\n } else {\n endsWith(value, end);\n }\n }\n }\n});\n","import { deepEqual, notDeepEqual } from '../assert.js';\nimport { use } from '../mixins.js';\nimport { type DeepPartial } from '../utils/types.js';\n\ndeclare module '../expect.types' {\n interface ValueExpect<T> {\n /**\n * check for deep equality\n */\n eql(value: T, message?: string): this;\n partially: ValueExpect<DeepPartial<T>>;\n }\n}\n\nuse({\n partially: {\n type: 'property',\n value: () => ({ partial: true })\n },\n eql: {\n type: 'method',\n value:\n ({ value, inverted, partial }) =>\n (other: any, message) => {\n if (inverted) {\n notDeepEqual(value, other, partial, message);\n } else {\n deepEqual(value, other, partial, message);\n }\n }\n }\n});\n","import { equal, notEqual } from '../assert.js';\nimport { type State, use } from '../mixins.js';\nimport { format } from 'hein-assertion-utils';\n\ndeclare module '../expect.types' {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface BooleanExpect<T> {\n /**\n * check if value is true\n */\n true(): this;\n /**\n * check if value is false\n */\n false(): this;\n }\n}\n\nconst values = {\n false: false,\n true: true\n};\n\nuse(\n Object.fromEntries(\n Object.entries(values).map(([key, expectValue]) => {\n return [\n key,\n {\n type: 'method',\n value:\n ({ inverted, value }: State<any>) =>\n () => {\n if (inverted) {\n const message = format(\n 'Expected {{= it.value }} to not be {{= it.key }}',\n {\n key,\n value\n },\n true\n );\n notEqual(value, expectValue, message);\n } else {\n const message = format(\n 'Expected {{= it.value }} to be {{= it.key }}',\n {\n key,\n value\n },\n true\n );\n equal(value, expectValue, message);\n }\n }\n }\n ];\n })\n )\n);\n","import { deepEqual, equal, notDeepEqual, notEqual } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface ValueExpect<T> {\n /**\n * check for === equality, NaN is considered equal to NaN\n */\n equal(value: T, message?: string): this;\n /**\n * check for === equality, NaN is considered equal to NaN\n */\n eq(value: T, message?: string): this;\n }\n}\n\nuse({\n equal: {\n type: 'method',\n value:\n ({ value, inverted, deep }) =>\n (other: any, message?: string) => {\n if (deep) {\n if (inverted) {\n notDeepEqual(value, other, message);\n } else {\n deepEqual(value, other, message);\n }\n return;\n }\n if (inverted) {\n notEqual(value, other, message);\n } else {\n equal(value, other, message);\n }\n }\n },\n eq: { type: 'alias', value: 'equal' }\n});\n","import omit from 'lodash/omit.js';\nimport { use } from '../mixins.js';\nimport { expectChain } from '../expect.js';\n\ndeclare module '../expect.types' {\n interface ObjectExpect<T> {\n /**\n * exclude keys from object to be compared further down the chain\n * @param keys\n */\n excluding<K extends keyof T>(...keys: K[]): ObjectExpect<Omit<T, K>>;\n }\n}\n\nuse({\n excluding: {\n type: 'method',\n value:\n (state) =>\n (...keys: string[]) => {\n return expectChain({ ...state, value: omit(state.value, keys) });\n }\n }\n});\n","import { greaterThanEqual, notGreaterThanEqual } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface NumberExpect<T> {\n /**\n * check if actual is greater than or equal to expected\n */\n greaterThanOrEqual(value: T): this;\n /**\n * check if actual is greater than or equal to expected\n */\n gte(value: T): this;\n /**\n * check if actual is greater than or equal to expected\n */\n atLeast(value: T): this;\n }\n interface DateExpect<T> {\n /**\n * check if actual is greater than or equal to expected\n */\n greaterThanOrEqual(value: T): this;\n /**\n * check if actual is greater than or equal to expected\n */\n gte(value: T): this;\n /**\n * check if actual is greater than or equal to expected\n */\n atLeast(value: T): this;\n }\n}\n\nuse({\n greaterThanOrEqual: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (other: any) => {\n if (inverted) {\n notGreaterThanEqual(value, other);\n } else {\n greaterThanEqual(value, other);\n }\n }\n },\n gte: { type: 'alias', value: 'greaterThanOrEqual' },\n atLeast: { type: 'alias', value: 'greaterThanOrEqual' }\n});\n","import { greaterThan, notGreaterThan } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface NumberExpect<T> {\n /**\n * check if actual is greater than expected\n */\n greaterThan(value: T): this;\n /**\n * check if actual is greater than expected\n */\n gt(value: T): this;\n /**\n * check if actual is greater than expected\n */\n above(value: T): this;\n }\n interface DateExpect<T> {\n /**\n * check if actual is greater than expected\n */\n greaterThan(value: T): this;\n /**\n * check if actual is greater than expected\n */\n gt(value: T): this;\n /**\n * check if actual is greater than expected\n */\n above(value: T): this;\n }\n}\n\nuse({\n greaterThan: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (other: any) => {\n if (inverted) {\n notGreaterThan(value, other);\n } else {\n greaterThan(value, other);\n }\n }\n },\n gt: { type: 'alias', value: 'greaterThan' },\n above: { type: 'alias', value: 'greaterThan' }\n});\n","import { deepHasProperty, deepNotHasProperty, hasProperty, notHasProperty } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface ValueExpect<T> {\n /**\n * check if value has a property\n * @param property a property in the object. When combined with .deep. can be a path like 'a.b.c'\n * @example expect({a: {b: {c: 1}}}).to.have.property('a.b.c');\n * @example expect({a: {b: {c: 1}}}).to.have.deep.property('[0].a.b.c');\n */\n property<K extends keyof T>(property: K): this;\n /**\n * check if value has a property\n * @param property a property in the object. When combined with .deep. can be a path like 'a.b.c'\n * @example expect({a: {b: {c: 1}}}).to.have.property('a.b.c');\n * @example expect({a: {b: {c: 1}}}).to.have.deep.property('[0].a.b.c');\n */\n property(property: string): this;\n /**\n * check if value has a property\n * @param property a property in the object. When combined with .deep. can be a path like 'a.b.c'\n * @param value\n * @example expect({a: {b: {c: 1}}}).to.have.property('a.b.c');\n * @example expect({a: {b: {c: 1}}}).to.have.deep.property('[0].a.b.c');\n */\n property<K extends keyof T>(property: K, value?: any): this;\n /**\n * check if value has a property\n * @param property a property in the object. When combined with .deep. can be a path like 'a.b.c'\n * @param value\n * @example expect({a: {b: {c: 1}}}).to.have.property('a.b.c');\n * @example expect({a: {b: {c: 1}}}).to.have.deep.property('[0].a.b.c');\n */\n property(property: string, value?: any): this;\n }\n}\n\nuse({\n property: {\n type: 'method',\n value:\n ({ value, inverted, deep }) =>\n (...args: [any, any]) => {\n if (deep) {\n if (inverted) {\n return deepNotHasProperty(value, ...args);\n }\n return deepHasProperty(value, ...args);\n }\n if (inverted) {\n return notHasProperty(value, ...args);\n }\n return hasProperty(value, ...args);\n }\n }\n});\n","import { includes, notIncludes } from '../assert.js';\nimport { use } from '../mixins.js';\n\ntype ArrayType<T> = T extends (infer U)[] ? U : T;\n\ndeclare module '../expect.types' {\n interface ArrayExpect<T> {\n /**\n * check if array includes element(s)\n */\n include(...elements: ArrayType<T>[]): this;\n /**\n * check if array includes element(s)\n */\n contain(...elements: ArrayType<T>[]): this;\n }\n interface StringExpect {\n /**\n * check if string includes substring(s)\n */\n include(...substrings: string[]): this;\n /**\n * check if string includes substring(s)\n */\n contain(...substrings: string[]): this;\n }\n}\n\nuse({\n include: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (...elements: any[]) => {\n if (inverted) {\n notIncludes(value, ...elements);\n } else {\n includes(value, ...elements);\n }\n }\n },\n contain: {\n type: 'alias',\n value: 'include'\n }\n});\n","import { instanceOf, notInstanceOf } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface DateExpect {\n /**\n * check if value is an instance of Date\n */\n Date(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ObjectExpect<T> {\n /**\n * check if value is an instance of Map\n */\n Map(): this;\n /**\n * check if value is an instance of Set\n */\n Set(): this;\n /**\n * check if value is an instance of WeakMap\n */\n WeakMap(): this;\n /**\n * check if value is an instance of WeakSet\n */\n WeakSet(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface MapExpect<T> {\n /**\n * check if value is an instance of Map\n */\n Map(): this;\n }\n}\n\nconst constructors = [Date, Map, Set, WeakMap, WeakSet];\n\nuse(\n Object.fromEntries(\n constructors.map((constructor) => {\n return [\n constructor.name,\n {\n type: 'method',\n value:\n ({ inverted, value }) =>\n () => {\n if (inverted) {\n notInstanceOf(value, constructor);\n } else {\n instanceOf(value, constructor);\n }\n }\n }\n ];\n })\n )\n);\n","import { notInstanceOf, instanceOf } from '../assert.js';\nimport { use } from '../mixins.js';\nimport { type Constructor } from '../utils/process-error.js';\n\ndeclare module '../expect.types' {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ValueExpect<T> {\n /**\n * check if instance of value\n * @param constructor - The constructor function to check against\n */\n instanceOf(constructor: Constructor): this;\n }\n}\n\nuse({\n instanceOf: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (constructor: Constructor) => {\n if (inverted) {\n notInstanceOf(value, constructor);\n } else {\n instanceOf(value, constructor);\n }\n }\n }\n});\n","import { hasKeys, notHasKeys } from '../assert.js';\nimport { use } from '../mixins.js';\n\ntype InferMapKeys<T> = T extends Map<infer K, any> ? K : never;\n\ndeclare module '../expect.types' {\n interface ObjectExpect<T> {\n /**\n * Check if value has keys\n */\n keys<K extends keyof T>(keys: K[] | K): this;\n }\n interface MapExpect<T> {\n /**\n * Check if value has keys\n */\n keys<K extends InferMapKeys<T>>(keys: K[] | K): this;\n }\n}\n\nuse({\n keys: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (keys) => {\n if (inverted) {\n notHasKeys(value, keys);\n } else {\n hasKeys(value, keys);\n }\n }\n }\n});\n","import { hasSize, notHasSize } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ObjectExpect<T> {\n /**\n * check for object/array/Map/Set/string to have a certain size\n */\n sizeOf(size: number, message?: string): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface MapExpect<T> {\n /**\n * check for Map to have a certain size\n */\n sizeOf(size: number, message?: string): this;\n }\n interface StringExpect {\n /**\n * check for string to have a certain size\n */\n lengthOf(length: number, message?: string): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ArrayExpect<T> {\n /**\n * check for array length\n */\n lengthOf(length: number, message?: string): this;\n }\n}\n\nuse({\n sizeOf: { type: 'alias', value: 'lengthOf' },\n lengthOf: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (length: number, message?: string) => {\n if (inverted) {\n notHasSize(value, length, message);\n } else {\n hasSize(value, length, message);\n }\n }\n }\n});\n","import { lessThanEqual, notLessThanEqual } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface NumberExpect<T> {\n /**\n * check if actual is less than or equal to expected\n */\n lessThanOrEqual(value: T): this;\n /**\n * check if actual is less than or equal to expected\n */\n lte(value: T): this;\n /**\n * check if actual is less than or equal to expected\n */\n atMost(value: T): this;\n }\n interface DateExpect<T> {\n /**\n * check if actual is less than or equal to expected\n */\n lessThanOrEqual(value: T): this;\n /**\n * check if actual is less than or equal to expected\n */\n lte(value: T): this;\n /**\n * check if actual is less than or equal to expected\n */\n atMost(value: T): this;\n }\n}\n\nuse({\n lessThanOrEqual: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (other: any) => {\n if (inverted) {\n notLessThanEqual(value, other);\n } else {\n lessThanEqual(value, other);\n }\n }\n },\n lte: { type: 'alias', value: 'lessThanOrEqual' },\n atMost: { type: 'alias', value: 'lessThanOrEqual' }\n});\n","import { lessThan, notLessThan } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface NumberExpect<T> {\n /**\n * check if actual is less than expected\n */\n lessThan(value: T): this;\n /**\n * check if actual is less than expected\n */\n lt(value: T): this;\n /**\n * check if actual is less than expected\n */\n below(value: T): this;\n }\n interface DateExpect<T> {\n /**\n * check if actual is less than expected\n */\n lessThan(value: T): this;\n /**\n * check if actual is less than expected\n */\n lt(value: T): this;\n /**\n * check if actual is less than expected\n */\n below(value: T): this;\n }\n}\n\nuse({\n lessThan: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (other: any) => {\n if (inverted) {\n notLessThan(value, other);\n } else {\n lessThan(value, other);\n }\n }\n },\n lt: { type: 'alias', value: 'lessThan' },\n below: { type: 'alias', value: 'lessThan' }\n});\n","import { match, notMatch } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface StringExpect<T> {\n /**\n * check if string matches regex\n */\n match(regex: RegExp): this;\n }\n}\n\nuse({\n match: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (regex: RegExp) => {\n if (inverted) {\n notMatch(value, regex);\n } else {\n match(value, regex);\n }\n }\n }\n});\n","import { hasMembers, notHasMembers } from '../assert.js';\nimport { use } from '../mixins.js';\nimport { type DeepPartial } from '../utils/types.js';\n\ntype InferArray<T> = T extends Array<infer U> ? U : any;\n\ndeclare module '../expect.types' {\n interface ArrayExpect<T> {\n /**\n * check that the members in second array are present in the first one\n */\n members(value: InferArray<T>[], message?: string): this;\n same: ArrayExpect<T>;\n ordered: ArrayExpect<T>;\n /**\n * Use partial matching for objects\n * @example\n * expect({ a: 1, b: 2 }).to.partially.eql({ a: 1 });\n */\n partially: ArrayExpect<DeepPartial<T>>;\n }\n}\n\nuse({\n members: {\n type: 'method',\n value:\n ({ value, inverted, same, deep, ordered, partial }) =>\n (other: any, message?: string) => {\n if (inverted) {\n notHasMembers(value, other, { deep, same, ordered, partial }, message);\n } else {\n hasMembers(value, other, { deep, same, ordered, partial }, message);\n }\n }\n },\n same: {\n type: 'property',\n value: (state) => {\n state.same = true;\n return state;\n }\n },\n ordered: {\n type: 'property',\n value: (state) => {\n state.ordered = true;\n return state;\n }\n }\n});\n","import { notRejects, rejects } from '../assert.js';\nimport { type State, use } from '../mixins.js';\nimport { type Constructor, type ErrorPredicate } from '../utils/process-error.js';\n\ndeclare module '../expect.types' {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface PromiseExpect<T> {\n /**\n * check if promise rejects\n * @param message\n */\n reject(message?: string): Promise<void>;\n reject(matcher: RegExp | Constructor<Error> | ErrorPredicate): Promise<void>;\n }\n}\n\nuse({\n reject: {\n type: 'method',\n value:\n ({ value, inverted }: State<any>) =>\n (...args: any[]) => {\n return inverted ? notRejects(value, ...args) : rejects(value, ...args);\n }\n }\n});\n","import { notRoundTo, roundTo } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface NumberExpect {\n /**\n * check if number close enough (default 10%)\n * @param target\n * @param decimal defaults to 0, can be negative if trying to round down to nearest 10, 100, etc\n */\n roundTo(target: number, decimal?: number): this;\n }\n}\n\nuse({\n roundTo: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (target, decimal = 0) => {\n if (inverted) {\n notRoundTo(value, target, decimal);\n } else {\n roundTo(value, target, decimal);\n }\n }\n }\n});\n","import { startsWith, notStartsWith } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface StringExpect {\n /**\n * check if string starts with other string\n * @param start\n * @example startsWith('foo', 'f');\n */\n startWith(start: string): this;\n }\n}\n\nuse({\n startWith: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (start: string) => {\n if (inverted) {\n notStartsWith(value, start);\n } else {\n startsWith(value, start);\n }\n }\n }\n});\n","import { notThrows, throws } from '../assert.js';\nimport { type State, use } from '../mixins.js';\nimport { type Constructor, type ErrorPredicate } from '../utils/process-error.js';\n\ndeclare module '../expect.types' {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface FunctionExpect<T> {\n /**\n * check if function throws\n * @param message\n */\n throw(message?: string): this;\n throw(matcher: RegExp | Constructor<Error> | ErrorPredicate, message?: string): this;\n }\n}\n\nuse({\n throw: {\n type: 'method',\n value:\n ({ value, inverted }: State<any>) =>\n (...args: any[]) => {\n return inverted ? notThrows(value, ...args) : throws(value, ...args);\n }\n }\n});\n","import { isType, notIsType } from '../assert.js';\nimport { use } from '../mixins.js';\nimport { type ValueType } from '../utils/get-type.js';\n\ndeclare module '../expect.types' {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface NumberExpect<T> {\n /**\n * check if value is a number\n */\n number(): this;\n /**\n * check if value is a NaN\n */\n NaN(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ArrayExpect<T> {\n /**\n * check if value is an array\n */\n array(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface BigIntExpect<T> {\n /**\n * check if value is a bigint\n */\n bigint(): this;\n }\n interface BooleanExpect {\n /**\n * check if value is a boolean\n */\n boolean(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface FunctionExpect<T> {\n /**\n * check if value is a function\n */\n function(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ValueExpect<T> {\n /**\n * check if value is null\n */\n null(): this;\n /**\n * check if value is undefined\n */\n undefined(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ObjectExpect<T> {\n /**\n * check if value is a plain object\n */\n object(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface StringExpect<T> {\n /**\n * check if value is a string\n */\n string(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface SymbolExpect<T> {\n /**\n * check if value is a symbol\n */\n symbol(): this;\n }\n}\n\nconst types: ValueType[] = [\n 'NaN',\n 'array',\n 'bigint',\n 'boolean',\n 'function',\n 'null',\n 'number',\n 'object',\n 'string',\n 'symbol',\n 'undefined'\n];\n\nuse(\n Object.fromEntries(\n types.map((type) => {\n return [\n type,\n {\n type: 'method',\n value:\n ({ value, inverted }) =>\n () => {\n if (inverted) {\n notIsType(value, type);\n } else {\n isType(value, type);\n }\n }\n }\n ];\n })\n )\n);\n","import { notIsType, isType } from '../assert.js';\nimport { use } from '../mixins.js';\nimport { type ValueType } from '../utils/get-type.js';\n\ndeclare module '../expect.types' {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ValueExpect<T> {\n /**\n * check if value is of certain type\n */\n type(type: ValueType): this;\n }\n}\n\nuse({\n type: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (type: ValueType) => {\n if (inverted) {\n notIsType(value, type);\n } else {\n isType(value, type);\n }\n }\n }\n});\n","import { AssertionError } from 'hein-assertion-utils';\n\n/**\n * Throw an AssertionError\n * @param {string} message - The message to pass to the AssertionError\n */\nexport const fail = (message: string = 'Fail') => {\n throw new AssertionError(undefined, undefined, message);\n};\n","import { mixins, State, use } from './mixins.js';\nimport { registerMethod, registerProperty } from './utils/chain.js';\nimport { getSize } from './utils/get-size.js';\nimport { Expect } from './expect.types.js';\nimport './expect/after.js';\nimport './expect/ballpark.js';\nimport './expect/before.js';\nimport './expect/between.js';\nimport './expect/empty.js';\nimport './expect/end-with.js';\nimport './expect/eql.js';\nimport './expect/equal-shorthand.js';\nimport './expect/equal.js';\nimport './expect/excluding.js';\nimport './expect/greater-than-equal.js';\nimport './expect/greater-than.js';\nimport './expect/has-property.js';\nimport './expect/include.js';\nimport './expect/instance-of-shorthand.js';\nimport './expect/instance-of.js';\nimport './expect/keys.js';\nimport './expect/length.js';\nimport './expect/less-than-equal.js';\nimport './expect/less-than.js';\nimport './expect/match.js';\nimport './expect/members.js';\nimport './expect/reject.js';\nimport './expect/round-to.js';\nimport './expect/start-with.js';\nimport './expect/throw.js';\nimport './expect/type-shorthand.js';\nimport './expect/type.js';\nimport mapValues from 'lodash/mapValues.js';\nimport { fail } from './utils/fail.js';\n\nuse({\n to: { type: 'property', value: () => null },\n be: { type: 'property', value: () => null },\n a: { type: 'property', value: () => null },\n an: { type: 'property', value: () => null },\n and: {\n type: 'property',\n value: ({ value, every, ...rest }) => {\n const values = mapValues(rest, () => {}) as any;\n return { value, every, ...values };\n }\n },\n have: { type: 'property', value: () => null },\n in: { type: 'property', value: () => null },\n not: { type: 'property', value: (state) => ({ ...state, inverted: !state.inverted }) },\n of: { type: 'property', value: () => null },\n\n length: { type: 'property', value: (state) => ({ ...state, getProperty: getSize }) },\n deep: { type: 'property', value: (state) => ({ ...state, deep: true }) },\n\n every: { type: 'property', value: (state) => ({ ...state, every: true }) }\n});\n\nexport const expectChain = <T>(state: State<T>) => {\n const chain = {} as any;\n for (const [key, v] of Object.entries(mixins)) {\n const definition = v.type === 'alias' ? mixins[v.value] : v;\n if (definition.type === 'property') {\n registerProperty(chain, key, () => {\n const newState = definition.value(state);\n return expectChain({ ...state, ...newState });\n });\n } else if (definition.type === 'method') {\n registerMethod(chain, key, (...args: any[]) => {\n if (state.getProperty) {\n definition.value({ value: state.getProperty(state.value), inverted: state.inverted })(...args);\n } else if (state.every) {\n for (const value of state.value as any) {\n definition.value({ ...state, value })(...args);\n }\n } else {\n const result = definition.value({ ...state })(...args);\n if (result as any) {\n return result;\n }\n }\n return expectChain(state);\n });\n }\n }\n return chain;\n};\n\nexport const expect = (<T>(actual: T) => {\n return expectChain({ value: actual });\n}) as Expect;\n\nexpect.fail = fail;\n"],"mappings":";;;;;;;;;;;AA6BA,MAAaA,SAAoD,EAAE;AAEnE,MAAa,OAAO,YAAuD;AACvE,QAAO,OAAO,QAAQ,QAAQ;;;;;AChClC,MAAa,oBAA8D,QAAW,MAAS,UAAa;A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AAO;EAAE,MAAM;EAAY,QAAQ,WAAW;GAAE,GAAG;GAAO,OAAO;GAAM;EAAG;CAC7E,CAAC;AAEF,MAAa,eAAkB,UAAoB;CAC/C,MAAM,QAAQ,EAAE;AAChB,MAAK,MAAM,CAAC,KAAK,MAAM,OAAO,QAAQ,OAAO,EAAE;EAC3C,MAAM,aAAa,EAAE,SAAS,UAAU,OAAO,EAAE,SAAS;AAC1D,MAAI,WAAW,SAAS,WACpB,kBAAiB,OAAO,WAAW;GAC/B,MAAM,WAAW,WAAW,MAAM,MAAM;AACxC,UAAO,YAAY;IAAE,GAAG;IAAO,GAAG;IAAU,CAAC;IAC/C;WACK,WAAW,SAAS,SAC3B,gBAAe,OAAO,MAAM,GAAG,SAAgB;AAC3C,OAAI,MAAM,YACN,YAAW,MAAM;IAAE,OAAO,MAAM,YAAY,MAAM,MAAM;IAAE,UAAU,MAAM;IAAU,CAAC,CAAC,GAAG,KAAK;YACvF,MAAM,MACb,MAAK,MAAM,SAAS,MAAM,MACtB,YAAW,MAAM;IAAE,GAAG;IAAO;IAAO,CAAC,CAAC,GAAG,KAAK;QAE/C;IACH,MAAM,SAAS,WAAW,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC,GAAG,KAAK;AACtD,QAAI,OACA,QAAO;;AAGf,UAAO,YAAY,MAAM;IAC3B;;AAGV,QAAO;;AAGX,MAAa,WAAc,WAAc;AACrC,QAAO,YAAY,EAAE,OAAO,QAAQ,CAAC;;AAGzC,OAAO,OAAO"}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ValueType, assert_d_exports } from "./assert-9EsvfQwn.cjs";
|
|
2
|
+
import { ErrorPredicate } from "./throws-D7JsW4NM.cjs";
|
|
3
|
+
import { Alias, Expect, Method, Property, State, fail, use } from "./expect.types-s8icgWp5.cjs";
|
|
4
|
+
import { AssertionError } from "hein-assertion-utils";
|
|
5
|
+
|
|
6
|
+
//#region src/expect.d.ts
|
|
7
|
+
|
|
8
|
+
declare const expectChain: <T>(state: State<T>) => any;
|
|
9
|
+
declare const expect: Expect;
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/utils/match.d.ts
|
|
12
|
+
declare const createEvaluation: (callback: (value: any) => boolean) => any;
|
|
13
|
+
declare const any: any;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { type Alias, AssertionError, type ErrorPredicate, type Method, type Property, type State, type ValueType, any, assert_d_exports as assert, createEvaluation, expect, expectChain, fail, use };
|
|
16
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/expect.ts","../src/utils/match.ts"],"sourcesContent":[],"mappings":";;;;;;;cA0Da,wBAAyB,MAAM;cA8B/B,QAEP;;;cChFO;ADgDA,cCxCA,GDoEZ,EAAA,GAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { ValueType, assert_d_exports } from "./assert-B_vcZS90.js";
|
|
2
|
+
import { ErrorPredicate } from "./throws-BrCCeBBl.js";
|
|
3
|
+
import { Alias, Expect, Method, Property, State, fail, use } from "./expect.types-DPl6xY56.js";
|
|
4
|
+
import { AssertionError } from "hein-assertion-utils";
|
|
5
|
+
|
|
6
|
+
//#region src/expect.d.ts
|
|
7
|
+
|
|
8
|
+
declare const expectChain: <T>(state: State<T>) => any;
|
|
9
|
+
declare const expect: Expect;
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/utils/match.d.ts
|
|
12
|
+
declare const createEvaluation: (callback: (value: any) => boolean) => any;
|
|
13
|
+
declare const any: any;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { type Alias, AssertionError, type ErrorPredicate, type Method, type Property, type State, type ValueType, any, assert_d_exports as assert, createEvaluation, expect, expectChain, fail, use };
|
|
9
16
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/expect.ts","../src/utils/match.ts"],"sourcesContent":[],"mappings":";;;;;;;cA0Da,wBAAyB,MAAM;cA8B/B,QAEP;;;cChFO;ADgDA,cCxCA,GDoEZ,EAAA,GAAA"}
|