@final-hill/decorator-contracts 0.25.1 → 1.0.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/README.md +169 -610
- package/dist/AssertionError.d.mts +3 -8
- package/dist/Contracted.d.mts +17 -21
- package/dist/assert.d.mts +19 -7
- package/dist/demands.d.mts +6 -0
- package/dist/ensures.d.mts +6 -0
- package/dist/iff.d.mts +19 -6
- package/dist/implies.d.mts +19 -6
- package/dist/index.d.mts +10 -13
- package/dist/index.mjs +1 -2
- package/dist/index.mjs.map +1 -1
- package/dist/invariant.d.mts +5 -0
- package/dist/rescue.d.mts +6 -0
- package/dist/types.d.mts +7 -0
- package/package.json +19 -18
- package/dist/Contract.d.mts +0 -39
- package/dist/Messages.d.mts +0 -16
- package/dist/index.mjs.LICENSE.txt +0 -6
- package/dist/lib/ClassRegistration.d.mts +0 -23
- package/dist/lib/ClassType.d.mts +0 -10
- package/dist/lib/Feature.d.mts +0 -26
- package/dist/lib/assertDemands.d.mts +0 -9
- package/dist/lib/assertEnsures.d.mts +0 -10
- package/dist/lib/assertInvariants.d.mts +0 -9
- package/dist/lib/classRegistry.d.mts +0 -12
- package/dist/lib/deepFreeze.d.mts +0 -8
- package/dist/lib/index.d.mts +0 -18
- package/dist/lib/takeWhile.d.mts +0 -8
- package/dist/lib/unChecked.d.mts +0 -9
- package/dist/tests/Contract.test.d.mts +0 -7
- package/dist/tests/Stack.test.d.mts +0 -7
- package/dist/tests/assert.test.d.mts +0 -7
- package/dist/tests/deepFreeze.test.d.mts +0 -7
- package/dist/tests/demands.test.d.mts +0 -7
- package/dist/tests/ensures.test.d.mts +0 -7
- package/dist/tests/factoryPattern.test.d.mts +0 -7
- package/dist/tests/iff.test.d.mts +0 -7
- package/dist/tests/implies.test.d.mts +0 -7
- package/dist/tests/invariant.test.d.mts +0 -7
- package/dist/tests/public-properties.test.d.mts +0 -7
- package/dist/tests/rescue.test.d.mts +0 -7
- package/dist/tests/within.test.d.mts +0 -7
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (C) 2024 Final Hill LLC
|
|
4
|
-
* SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
-
* @see <https://spdx.org/licenses/AGPL-3.0-only.html>
|
|
6
|
-
*/
|
|
7
|
-
import { Contract } from '../index.mjs';
|
|
8
|
-
declare function assertInvariants<U>(ctx: U, contract: Contract<any>): void;
|
|
9
|
-
export default assertInvariants;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (C) 2024 Final Hill LLC
|
|
4
|
-
* SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
-
* @see <https://spdx.org/licenses/AGPL-3.0-only.html>
|
|
6
|
-
*/
|
|
7
|
-
import { ClassRegistration, ClassType } from './index.mjs';
|
|
8
|
-
declare class ClassRegistry extends WeakMap<ClassType<any>, ClassRegistration> {
|
|
9
|
-
getOrCreate(Class: ClassType<any>): ClassRegistration;
|
|
10
|
-
}
|
|
11
|
-
declare const _default: ClassRegistry;
|
|
12
|
-
export default _default;
|
package/dist/lib/index.d.mts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (C) 2024 Final Hill LLC
|
|
4
|
-
* SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
-
* @see <https://spdx.org/licenses/AGPL-3.0-only.html>
|
|
6
|
-
*/
|
|
7
|
-
import assertDemands from './assertDemands.mjs';
|
|
8
|
-
import assertEnsures from './assertEnsures.mjs';
|
|
9
|
-
import assertInvariants from './assertInvariants.mjs';
|
|
10
|
-
import classRegistry from './classRegistry.mjs';
|
|
11
|
-
import ClassRegistration from './ClassRegistration.mjs';
|
|
12
|
-
import { ClassType } from './ClassType.mjs';
|
|
13
|
-
import deepFreeze from './deepFreeze.mjs';
|
|
14
|
-
import Feature from './Feature.mjs';
|
|
15
|
-
import takeWhile from './takeWhile.mjs';
|
|
16
|
-
import unChecked from './unChecked.mjs';
|
|
17
|
-
declare const fnTrue: () => boolean;
|
|
18
|
-
export { assertDemands, assertEnsures, assertInvariants, classRegistry, ClassRegistration, ClassType, deepFreeze, Feature, fnTrue, takeWhile, unChecked };
|
package/dist/lib/takeWhile.d.mts
DELETED
package/dist/lib/unChecked.d.mts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (C) 2024 Final Hill LLC
|
|
4
|
-
* SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
-
* @see <https://spdx.org/licenses/AGPL-3.0-only.html>
|
|
6
|
-
*/
|
|
7
|
-
import { Contract } from '../index.mjs';
|
|
8
|
-
declare const unChecked: (contract: Contract<any>, fn: () => any) => void;
|
|
9
|
-
export default unChecked;
|