@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.
Files changed (42) hide show
  1. package/README.md +169 -610
  2. package/dist/AssertionError.d.mts +3 -8
  3. package/dist/Contracted.d.mts +17 -21
  4. package/dist/assert.d.mts +19 -7
  5. package/dist/demands.d.mts +6 -0
  6. package/dist/ensures.d.mts +6 -0
  7. package/dist/iff.d.mts +19 -6
  8. package/dist/implies.d.mts +19 -6
  9. package/dist/index.d.mts +10 -13
  10. package/dist/index.mjs +1 -2
  11. package/dist/index.mjs.map +1 -1
  12. package/dist/invariant.d.mts +5 -0
  13. package/dist/rescue.d.mts +6 -0
  14. package/dist/types.d.mts +7 -0
  15. package/package.json +19 -18
  16. package/dist/Contract.d.mts +0 -39
  17. package/dist/Messages.d.mts +0 -16
  18. package/dist/index.mjs.LICENSE.txt +0 -6
  19. package/dist/lib/ClassRegistration.d.mts +0 -23
  20. package/dist/lib/ClassType.d.mts +0 -10
  21. package/dist/lib/Feature.d.mts +0 -26
  22. package/dist/lib/assertDemands.d.mts +0 -9
  23. package/dist/lib/assertEnsures.d.mts +0 -10
  24. package/dist/lib/assertInvariants.d.mts +0 -9
  25. package/dist/lib/classRegistry.d.mts +0 -12
  26. package/dist/lib/deepFreeze.d.mts +0 -8
  27. package/dist/lib/index.d.mts +0 -18
  28. package/dist/lib/takeWhile.d.mts +0 -8
  29. package/dist/lib/unChecked.d.mts +0 -9
  30. package/dist/tests/Contract.test.d.mts +0 -7
  31. package/dist/tests/Stack.test.d.mts +0 -7
  32. package/dist/tests/assert.test.d.mts +0 -7
  33. package/dist/tests/deepFreeze.test.d.mts +0 -7
  34. package/dist/tests/demands.test.d.mts +0 -7
  35. package/dist/tests/ensures.test.d.mts +0 -7
  36. package/dist/tests/factoryPattern.test.d.mts +0 -7
  37. package/dist/tests/iff.test.d.mts +0 -7
  38. package/dist/tests/implies.test.d.mts +0 -7
  39. package/dist/tests/invariant.test.d.mts +0 -7
  40. package/dist/tests/public-properties.test.d.mts +0 -7
  41. package/dist/tests/rescue.test.d.mts +0 -7
  42. 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;
@@ -1,8 +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
- declare function deepFreeze(object: Record<PropertyKey, any>): void;
8
- export default deepFreeze;
@@ -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 };
@@ -1,8 +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
- export declare function takeWhile<T>(xs: T[], pred: (x: T) => boolean): T[];
8
- export default takeWhile;
@@ -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;
@@ -1,7 +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
- export {};
@@ -1,7 +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
- export {};
@@ -1,7 +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
- export {};
@@ -1,7 +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
- export {};
@@ -1,7 +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
- export {};
@@ -1,7 +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
- export {};
@@ -1,7 +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
- export {};
@@ -1,7 +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
- export {};
@@ -1,7 +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
- export {};
@@ -1,7 +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
- export {};
@@ -1,7 +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
- export {};
@@ -1,7 +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
- export {};
@@ -1,7 +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
- export {};