@jonloucks/contracts-ts 0.5.0 → 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 (129) hide show
  1. package/api/AutoClose.d.ts +3 -5
  2. package/api/AutoClose.d.ts.map +1 -1
  3. package/api/AutoClose.js +14 -7
  4. package/api/AutoClose.js.map +1 -1
  5. package/api/AutoCloseFactory.d.ts +2 -11
  6. package/api/AutoCloseFactory.d.ts.map +1 -1
  7. package/api/AutoCloseFactory.js +4 -25
  8. package/api/AutoCloseFactory.js.map +1 -1
  9. package/api/AutoOpen.d.ts +3 -5
  10. package/api/AutoOpen.d.ts.map +1 -1
  11. package/api/AutoOpen.js +1 -2
  12. package/api/AutoOpen.js.map +1 -1
  13. package/api/BasicContract.d.ts +8 -2
  14. package/api/BasicContract.d.ts.map +1 -1
  15. package/api/BasicContract.js +35 -7
  16. package/api/BasicContract.js.map +1 -1
  17. package/api/BindStrategy.d.ts +0 -3
  18. package/api/BindStrategy.d.ts.map +1 -1
  19. package/api/BindStrategy.js +0 -1
  20. package/api/BindStrategy.js.map +1 -1
  21. package/api/Contract.d.ts +15 -13
  22. package/api/Contract.d.ts.map +1 -1
  23. package/api/Contract.js +1 -1
  24. package/api/Contract.js.map +1 -1
  25. package/api/ContractFactory.d.ts +2 -2
  26. package/api/ContractFactory.d.ts.map +1 -1
  27. package/api/ContractFactory.js +1 -1
  28. package/api/ContractFactory.js.map +1 -1
  29. package/api/Contracts.d.ts +4 -4
  30. package/api/Contracts.d.ts.map +1 -1
  31. package/api/Contracts.js +2 -2
  32. package/api/Contracts.js.map +1 -1
  33. package/api/ContractsFactory.d.ts +2 -2
  34. package/api/ContractsFactory.d.ts.map +1 -1
  35. package/api/ContractsFactory.js +1 -1
  36. package/api/ContractsFactory.js.map +1 -1
  37. package/api/Open.d.ts +20 -0
  38. package/api/Open.d.ts.map +1 -0
  39. package/api/Open.js +14 -0
  40. package/api/Open.js.map +1 -0
  41. package/api/Promisor.d.ts +1 -10
  42. package/api/Promisor.d.ts.map +1 -1
  43. package/api/Promisor.js +2 -26
  44. package/api/Promisor.js.map +1 -1
  45. package/api/PromisorFactory.d.ts +1 -7
  46. package/api/PromisorFactory.d.ts.map +1 -1
  47. package/api/PromisorFactory.js +4 -24
  48. package/api/PromisorFactory.js.map +1 -1
  49. package/api/RatifiedContract.d.ts +2 -2
  50. package/api/RatifiedContract.d.ts.map +1 -1
  51. package/api/RatifiedContract.js +1 -4
  52. package/api/RatifiedContract.js.map +1 -1
  53. package/api/Repository.d.ts +4 -9
  54. package/api/Repository.d.ts.map +1 -1
  55. package/api/Repository.js +2 -25
  56. package/api/Repository.js.map +1 -1
  57. package/api/RepositoryFactory.d.ts +2 -8
  58. package/api/RepositoryFactory.d.ts.map +1 -1
  59. package/api/RepositoryFactory.js +2 -23
  60. package/api/RepositoryFactory.js.map +1 -1
  61. package/api/Types.d.ts +11 -66
  62. package/api/Types.d.ts.map +1 -1
  63. package/api/Types.js +14 -105
  64. package/api/Types.js.map +1 -1
  65. package/auxiliary/AtomicBoolean.d.ts +2 -11
  66. package/auxiliary/AtomicBoolean.d.ts.map +1 -1
  67. package/auxiliary/AtomicBoolean.js +1 -25
  68. package/auxiliary/AtomicBoolean.js.map +1 -1
  69. package/auxiliary/AtomicBooleanFactory.d.ts +3 -12
  70. package/auxiliary/AtomicBooleanFactory.d.ts.map +1 -1
  71. package/auxiliary/AtomicBooleanFactory.js +2 -24
  72. package/auxiliary/AtomicBooleanFactory.js.map +1 -1
  73. package/auxiliary/AtomicInteger.d.ts +2 -11
  74. package/auxiliary/AtomicInteger.d.ts.map +1 -1
  75. package/auxiliary/AtomicInteger.js +1 -25
  76. package/auxiliary/AtomicInteger.js.map +1 -1
  77. package/auxiliary/AtomicIntegerFactory.d.ts +3 -12
  78. package/auxiliary/AtomicIntegerFactory.d.ts.map +1 -1
  79. package/auxiliary/AtomicIntegerFactory.js +2 -24
  80. package/auxiliary/AtomicIntegerFactory.js.map +1 -1
  81. package/auxiliary/AtomicReference.d.ts +2 -11
  82. package/auxiliary/AtomicReference.d.ts.map +1 -1
  83. package/auxiliary/AtomicReference.js +1 -25
  84. package/auxiliary/AtomicReference.js.map +1 -1
  85. package/auxiliary/AtomicReferenceFactory.d.ts +2 -11
  86. package/auxiliary/AtomicReferenceFactory.d.ts.map +1 -1
  87. package/auxiliary/AtomicReferenceFactory.js +2 -24
  88. package/auxiliary/AtomicReferenceFactory.js.map +1 -1
  89. package/impl/AtomicBooleanFactory.impl.js +2 -2
  90. package/impl/AtomicBooleanFactory.impl.js.map +1 -1
  91. package/impl/AtomicIntegerFactory.impl.js +2 -2
  92. package/impl/AtomicIntegerFactory.impl.js.map +1 -1
  93. package/impl/AtomicReferenceFactory.impl.js +2 -2
  94. package/impl/AtomicReferenceFactory.impl.js.map +1 -1
  95. package/impl/ContractFactory.impl.js +2 -2
  96. package/impl/ContractFactory.impl.js.map +1 -1
  97. package/impl/Contracts.impl.d.ts.map +1 -1
  98. package/impl/Contracts.impl.js +7 -1
  99. package/impl/Contracts.impl.js.map +1 -1
  100. package/impl/ContractsFactory.impl.js +4 -4
  101. package/impl/ContractsFactory.impl.js.map +1 -1
  102. package/impl/ContractsWrapper.impl.d.ts.map +1 -1
  103. package/impl/ContractsWrapper.impl.js +3 -0
  104. package/impl/ContractsWrapper.impl.js.map +1 -1
  105. package/impl/Events.d.ts +2 -2
  106. package/impl/Events.d.ts.map +1 -1
  107. package/impl/Events.impl.d.ts.map +1 -1
  108. package/impl/Events.impl.js +3 -0
  109. package/impl/Events.impl.js.map +1 -1
  110. package/impl/LifeCyclePromisor.impl.js +2 -2
  111. package/impl/LifeCyclePromisor.impl.js.map +1 -1
  112. package/impl/Repository.impl.d.ts.map +1 -1
  113. package/impl/Repository.impl.js +7 -1
  114. package/impl/Repository.impl.js.map +1 -1
  115. package/impl/RepositoryFactory.impl.js +1 -1
  116. package/impl/RepositoryFactory.impl.js.map +1 -1
  117. package/index.d.ts +3 -3
  118. package/index.d.ts.map +1 -1
  119. package/index.js +7 -7
  120. package/index.js.map +1 -1
  121. package/package.json +2 -2
  122. package/api/Lawyer.d.ts +0 -20
  123. package/api/Lawyer.d.ts.map +0 -1
  124. package/api/Lawyer.js +0 -3
  125. package/api/Lawyer.js.map +0 -1
  126. package/auxiliary/ClassCastException.d.ts +0 -8
  127. package/auxiliary/ClassCastException.d.ts.map +0 -1
  128. package/auxiliary/ClassCastException.js +0 -18
  129. package/auxiliary/ClassCastException.js.map +0 -1
package/api/Types.js CHANGED
@@ -5,24 +5,15 @@
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.isPresent = isPresent;
7
7
  exports.isNotPresent = isNotPresent;
8
- exports.isFunctionPresent = isFunctionPresent;
9
8
  exports.isFunction = isFunction;
10
- exports.isObjectPresent = isObjectPresent;
11
9
  exports.isObject = isObject;
12
- exports.isStringPresent = isStringPresent;
13
10
  exports.isString = isString;
14
- exports.isNumberPresent = isNumberPresent;
15
11
  exports.isNumber = isNumber;
16
- exports.isSymbolPresent = isSymbolPresent;
17
12
  exports.isSymbol = isSymbol;
18
- exports.isBooleanPresent = isBooleanPresent;
19
13
  exports.isBoolean = isBoolean;
20
- exports.isBigIntPresent = isBigIntPresent;
21
14
  exports.isBigInt = isBigInt;
22
- exports.isConstructorPresent = isConstructorPresent;
23
15
  exports.isConstructor = isConstructor;
24
- exports.hasFunctions = hasFunctions;
25
- exports.hasFunctionsPresent = hasFunctionsPresent;
16
+ exports.guardFunctions = guardFunctions;
26
17
  /**
27
18
  * Check iif given value is not null or undefined
28
19
  *
@@ -46,128 +37,65 @@ function isNotPresent(value) {
46
37
  * @param value the value to check
47
38
  * @returns true if value is a function and is not null or undefined
48
39
  */
49
- function isFunctionPresent(value) {
50
- return _typeOfPresent(value, "function");
51
- }
52
- /**
53
- * Check if given value is a function or null/undefined
54
- * @param value the value to check
55
- * @returns true if value is a function
56
- */
57
40
  function isFunction(value) {
58
- return _isTypeOf(value, "function");
41
+ return isPresent(value) && typeof value === "function";
59
42
  }
60
43
  /**
61
44
  * Check if given value is an object and is not null or undefined
62
45
  * @param value the value to check
63
46
  * @returns true if value is an object and is not null or undefined
64
47
  */
65
- function isObjectPresent(value) {
66
- return _typeOfPresent(value, "object");
67
- }
68
- /**
69
- * Check if given value is an object or null/undefined
70
- * @param value the value to check
71
- * @returns true if value is an object
72
- */
73
48
  function isObject(value) {
74
- return _isTypeOf(value, "object");
75
- }
76
- /**
77
- * Check if given value is a string and is not null or undefined
78
- * @param value the value to check
79
- * @returns true if value is a string and is not null or undefined
80
- */
81
- function isStringPresent(value) {
82
- return _typeOfPresent(value, "string");
49
+ return isPresent(value) && typeof value === "object";
83
50
  }
84
51
  /**
85
- * Check if given value is a string or null/undefined
52
+ * Check if given value is a string
53
+ *
86
54
  * @param value the value to check
87
55
  * @returns true if value is a string
88
56
  */
89
57
  function isString(value) {
90
- return _isTypeOf(value, "string");
58
+ return isPresent(value) && typeof value === "string";
91
59
  }
92
60
  /**
93
61
  * Check if given value is a number and is not null or undefined
94
62
  * @param value the value to check
95
63
  * @returns true if value is a number and is not null or undefined
96
64
  */
97
- function isNumberPresent(value) {
98
- return _typeOfPresent(value, "number");
99
- }
100
- /**
101
- * Check if given value is a number or null/undefined
102
- * @param value the value to check
103
- * @returns true if value is a number
104
- */
105
65
  function isNumber(value) {
106
- return _isTypeOf(value, "number");
66
+ return isPresent(value) && typeof value === "number";
107
67
  }
108
68
  /**
109
69
  * Check if given value is a symbol and is not null or undefined
110
70
  * @param value the value to check
111
71
  * @returns true if value is a symbol and is not null or undefined
112
72
  */
113
- function isSymbolPresent(value) {
114
- return _typeOfPresent(value, "symbol");
115
- }
116
- /**
117
- * Check if given value is a symbol or null/undefined
118
- * @param value the value to check
119
- * @returns true if value is a symbol
120
- */
121
73
  function isSymbol(value) {
122
- return _isTypeOf(value, "symbol");
74
+ return isPresent(value) && typeof value === "symbol";
123
75
  }
124
76
  /**
125
77
  * Check if given value is a boolean and is not null or undefined
126
78
  * @param value the value to check
127
79
  * @returns true if value is a boolean and is not null or undefined
128
80
  */
129
- function isBooleanPresent(value) {
130
- return _typeOfPresent(value, "boolean");
131
- }
132
- /**
133
- * Check if given value is a boolean or null/undefined
134
- * @param value the value to check
135
- * @returns true if value is a boolean
136
- */
137
81
  function isBoolean(value) {
138
- return _isTypeOf(value, "boolean");
82
+ return isPresent(value) && typeof value === "boolean";
139
83
  }
140
84
  /**
141
85
  * Check if given value is a bigint and is not null or undefined
142
86
  * @param value the value to check
143
87
  * @returns true if value is a bigint and is not null or undefined
144
88
  */
145
- function isBigIntPresent(value) {
146
- return _typeOfPresent(value, "bigint");
147
- }
148
- /**
149
- * Check if given value is a bigint or null/undefined
150
- * @param value the value to check
151
- * @returns true if value is a bigint
152
- */
153
89
  function isBigInt(value) {
154
- return _isTypeOf(value, "bigint");
90
+ return isPresent(value) && typeof value === "bigint";
155
91
  }
156
92
  /**
157
93
  * Check if given value is a constructor and is not null or undefined
158
94
  * @param value the value to check
159
95
  * @returns true if value is a constructor and is not null or undefined
160
96
  */
161
- function isConstructorPresent(value) {
162
- return isFunctionPresent(value) && 'prototype' in value && 'constructor' in value;
163
- }
164
- /**
165
- * Check if given value is a constructor or null/undefined
166
- * @param value the value to check
167
- * @returns true if value is a constructor
168
- */
169
97
  function isConstructor(value) {
170
- return isNotPresent(value) || isConstructorPresent(value);
98
+ return isFunction(value) && 'prototype' in value && 'constructor' in value;
171
99
  }
172
100
  /**
173
101
  * Check if given value has defined properties
@@ -177,32 +105,13 @@ function isConstructor(value) {
177
105
  * @param propertyNames the property names to check
178
106
  * @returns true if property is defined
179
107
  */
180
- function hasFunctions(value, ...propertyNames) {
181
- return _hasFunctions(value, propertyNames, false);
182
- }
183
- /**
184
- * Check if given value has defined properties
185
- *
186
- * @param value the value to check
187
- * @param propertyNames the property names to check
188
- * @returns true if property is defined
189
- */
190
- function hasFunctionsPresent(value, ...propertyNames) {
191
- return _hasFunctions(value, propertyNames, true);
192
- }
193
- function _isTypeOf(value, type) {
194
- return isNotPresent(value) || _typeOfPresent(value, type);
195
- }
196
- function _typeOfPresent(value, type) {
197
- return isPresent(value) && typeof value === type;
198
- }
199
- function _hasFunctions(value, propertyNames, required) {
108
+ function guardFunctions(value, ...propertyNames) {
200
109
  if (isNotPresent(value)) {
201
- return !required;
110
+ return false;
202
111
  }
203
112
  const record = value;
204
113
  for (const propertyName of propertyNames) {
205
- if (!isFunctionPresent(record[propertyName])) {
114
+ if (!isFunction(record[propertyName])) {
206
115
  return false;
207
116
  }
208
117
  }
package/api/Types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Types.js","sourceRoot":"","sources":["../../src/api/Types.ts"],"names":[],"mappings":";AAAA;;GAEG;;AA8BH,8BAEC;AAQD,oCAEC;AAOD,8CAEC;AAOD,gCAEC;AAOD,0CAEC;AAOD,4BAEC;AAOD,0CAEC;AAOD,4BAEC;AAOD,0CAEC;AAOD,4BAEC;AAOD,0CAEC;AAOD,4BAEC;AAOD,4CAEC;AAOD,8BAEC;AAOD,0CAEC;AAOD,4BAEC;AAOD,oDAEC;AAOD,sCAEC;AAUD,oCAEC;AASD,kDAEC;AAzLD;;;;;GAKG;AACH,SAAgB,SAAS,CAAI,KAAc;IACzC,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AAC/C,CAAC;AAED;;;;;GAKG;AACH,SAAgB,YAAY,CAAC,KAAc;IACzC,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AAC/C,CAAC;AAED;;;;GAIG;AACH,SAAgB,iBAAiB,CAA4B,KAAc;IACzE,OAAO,cAAc,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAC3C,CAAC;AAED;;;;GAIG;AACH,SAAgB,UAAU,CAAC,KAAc;IACvC,OAAO,SAAS,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AACtC,CAAC;AAED;;;;GAIG;AACH,SAAgB,eAAe,CAAC,KAAc;IA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S,CAAC,KAAc;IACtC,OAAO,SAAS,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,SAAS,CAAC;AACxD,CAAC;AAED;;;;GAIG;AACH,SAAgB,QAAQ,CAAC,KAAc;IACrC,OAAO,SAAS,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC;AACvD,CAAC;AAED;;;;GAIG;AACH,SAAgB,aAAa,CAAI,KAAc;IAC7C,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,WAAW,IAAI,KAAK,IAAI,aAAa,IAAI,KAAK,CAAA;AAC5E,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,cAAc,CAAC,KAAc,EAAE,GAAG,aAAkC;IAClF,IAAI,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,MAAM,GAAG,KAAyC,CAAC;IACzD,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE,CAAC;QACzC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC;YACtC,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1,5 +1,4 @@
1
- import { Lawyer } from "@jonloucks/contracts-ts/api/Lawyer";
2
- import { OptionalType } from "@jonloucks/contracts-ts/api/Types";
1
+ import { RequiredType } from "@jonloucks/contracts-ts/api/Types";
3
2
  /**
4
3
  * Responsibility: An atomic boolean interface for thread-safe boolean operations.
5
4
  */
@@ -33,13 +32,5 @@ export interface AtomicBoolean {
33
32
  * @param instance the instance to check
34
33
  * @returns true if the instance implements AtomicBoolean
35
34
  */
36
- export declare function guard(instance: unknown): instance is OptionalType<AtomicBoolean>;
37
- /** @deprecated use guard instead
38
- */
39
- export { guard as isAtomicBoolean };
40
- /**
41
- * For creating a Contract for AtomicBoolean with duck-typing checks.
42
- * @deprecated create a contract using typeGuard directly
43
- */
44
- export declare const LAWYER: Lawyer<AtomicBoolean>;
35
+ export declare function guard(instance: unknown): instance is RequiredType<AtomicBoolean>;
45
36
  //# sourceMappingURL=AtomicBoolean.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AtomicBoolean.d.ts","sourceRoot":"","sources":["../../src/auxiliary/AtomicBoolean.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAgB,MAAM,mCAAmC,CAAC;AAE/E;;GAEG;AACH,MAAM,WAAW,aAAa;IAE1B;;OAEG;IACH,GAAG,IAAI,OAAO,CAAC;IAEf;;;OAGG;IACH,GAAG,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;IAE7B;;;;;;OAMG;IACH,aAAa,CAAC,aAAa,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC;IAElE;;;OAGG;IACH,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;CACjE;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,YAAY,CAAC,aAAa,CAAC,CAEhF;AAED;GACG;AACH,OAAO,EAAE,KAAK,IAAI,eAAe,EAAE,CAAA;AAEnC;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,aAAa,CAoBxC,CAAC"}
1
+ {"version":3,"file":"AtomicBoolean.d.ts","sourceRoot":"","sources":["../../src/auxiliary/AtomicBoolean.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAkB,MAAM,mCAAmC,CAAC;AAEjF;;GAEG;AACH,MAAM,WAAW,aAAa;IAE1B;;OAEG;IACH,GAAG,IAAI,OAAO,CAAC;IAEf;;;OAGG;IACH,GAAG,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;IAE7B;;;;;;OAMG;IACH,aAAa,CAAC,aAAa,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC;IAElE;;;OAGG;IACH,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;CACjE;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,YAAY,CAAC,aAAa,CAAC,CAEhF"}
@@ -1,9 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LAWYER = void 0;
4
3
  exports.guard = guard;
5
- exports.isAtomicBoolean = guard;
6
- const RatifiedContract_1 = require("@jonloucks/contracts-ts/api/RatifiedContract");
7
4
  const Types_1 = require("@jonloucks/contracts-ts/api/Types");
8
5
  /**
9
6
  * Type guard for AtomicBoolean interface.
@@ -12,27 +9,6 @@ const Types_1 = require("@jonloucks/contracts-ts/api/Types");
12
9
  * @returns true if the instance implements AtomicBoolean
13
10
  */
14
11
  function guard(instance) {
15
- return (0, Types_1.hasFunctions)(instance, "compareAndSet", "get", "set");
12
+ return (0, Types_1.guardFunctions)(instance, "compareAndSet", "get", "set");
16
13
  }
17
- /**
18
- * For creating a Contract for AtomicBoolean with duck-typing checks.
19
- * @deprecated create a contract using typeGuard directly
20
- */
21
- exports.LAWYER = new class {
22
- /**
23
- * Lawyer.isDeliverable override
24
- */
25
- isDeliverable(instance) {
26
- return guard(instance);
27
- }
28
- /**
29
- * Lawyer.createContract override
30
- */
31
- createContract(config) {
32
- const copy = { ...config ?? {} };
33
- copy.test ?? (copy.test = this.isDeliverable);
34
- copy.typeName ?? (copy.typeName = "AtomicBoolean");
35
- return (0, RatifiedContract_1.create)(copy);
36
- }
37
- };
38
14
  //# sourceMappingURL=AtomicBoolean.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AtomicBoolean.js","sourceRoot":"","sources":["../../src/auxiliary/AtomicBoolean.ts"],"names":[],"mappings":";;;AA2CA,sBAEC;AAIiB,gCAAe;AA/CjC,mFAAwF;AACxF,6DAA+E;AAkC/E;;;;;GAKG;AACH,SAAgB,KAAK,CAAC,QAAiB;IACnC,OAAO,IAAA,oBAAY,EAAC,QAAQ,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AACjE,CAAC;AAMD;;;GAGG;AACU,QAAA,MAAM,GAA0B,IAAI;IAE7C;;OAEG;IACH,aAAa,CAA0B,QAAiB;QACpD,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,cAAc,CAA0B,MAA0B;QAC9D,MAAM,IAAI,GAAsB,EAAE,GAAG,MAAM,IAAI,EAAE,EAAE,CAAC;QAEpD,IAAI,CAAC,IAAI,KAAT,IAAI,CAAC,IAAI,GAAK,IAAI,CAAC,aAAa,EAAC;QACjC,IAAI,CAAC,QAAQ,KAAb,IAAI,CAAC,QAAQ,GAAK,eAAe,EAAC;QAElC,OAAO,IAAA,yBAAc,EAAI,IAAI,CAAC,CAAC;IACnC,CAAC;CACJ,CAAC"}
1
+ {"version":3,"file":"AtomicBoolean.js","sourceRoot":"","sources":["../../src/auxiliary/AtomicBoolean.ts"],"names":[],"mappings":";;AAwCA,sBAEC;AA1CD,6DAAiF;AAkCjF;;;;;GAKG;AACH,SAAgB,KAAK,CAAC,QAAiB;IACnC,OAAO,IAAA,sBAAc,EAAC,QAAQ,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AACnE,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import { Contract } from "@jonloucks/contracts-ts/api/Contract";
2
- import { Lawyer } from "@jonloucks/contracts-ts/api/Lawyer";
3
- import { OptionalType, RequiredType } from "@jonloucks/contracts-ts/api/Types";
2
+ import { RequiredType } from "@jonloucks/contracts-ts/api/Types";
4
3
  import { AtomicBoolean } from "@jonloucks/contracts-ts/auxiliary/AtomicBoolean";
5
4
  /**
6
5
  * Factory interface for creating AtomicBoolean instances.
@@ -10,7 +9,7 @@ export interface AtomicBooleanFactory {
10
9
  * Create a new AtomicBoolean instance.
11
10
  * @param initialValue the initial value of the AtomicBoolean
12
11
  */
13
- create(initialValue?: boolean): RequiredType<AtomicBoolean>;
12
+ createAtomicBoolean(initialValue?: boolean): RequiredType<AtomicBoolean>;
14
13
  }
15
14
  /**
16
15
  * Type guard for AtomicBooleanFactory interface.
@@ -18,15 +17,7 @@ export interface AtomicBooleanFactory {
18
17
  * @param instance the instance to check
19
18
  * @returns true if the instance implements AtomicBooleanFactory
20
19
  */
21
- export declare function guard(instance: unknown): instance is OptionalType<AtomicBooleanFactory>;
22
- /** @deprecated use guard instead
23
- */
24
- export { guard as isAtomicBooleanFactory };
25
- /**
26
- * For creating a Contract for AtomicBoolean with duck-typing checks.
27
- * @deprecated use CONTRACT instead
28
- */
29
- export declare const LAWYER: Lawyer<AtomicBooleanFactory>;
20
+ export declare function guard(instance: unknown): instance is RequiredType<AtomicBooleanFactory>;
30
21
  /**
31
22
  * The factory Contract for creating new AtomicBoolean instances.
32
23
  */
@@ -1 +1 @@
1
- {"version":3,"file":"AtomicBooleanFactory.d.ts","sourceRoot":"","sources":["../../src/auxiliary/AtomicBooleanFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAA4B,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAgB,MAAM,mCAAmC,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AAEhF;;GAEG;AACH,MAAM,WAAW,oBAAoB;IAEnC;;;OAGG;IACH,MAAM,CAAC,YAAY,CAAC,EAAE,OAAO,GAAG,YAAY,CAAC,aAAa,CAAC,CAAC;CAC7D;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,YAAY,CAAC,oBAAoB,CAAC,CAEvF;AAED;GACG;AACH,OAAO,EAAE,KAAK,IAAI,sBAAsB,EAAE,CAAA;AAE1C;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,oBAAoB,CAoB/C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,oBAAoB,CAGlD,CAAC"}
1
+ {"version":3,"file":"AtomicBooleanFactory.d.ts","sourceRoot":"","sources":["../../src/auxiliary/AtomicBooleanFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAEhE,OAAO,EAAE,YAAY,EAAkB,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AAEhF;;GAEG;AACH,MAAM,WAAW,oBAAoB;IAEnC;;;OAGG;IACH,mBAAmB,CAAC,YAAY,CAAC,EAAE,OAAO,GAAG,YAAY,CAAC,aAAa,CAAC,CAAC;CAC1E;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,YAAY,CAAC,oBAAoB,CAAC,CAEvF;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,oBAAoB,CAGlD,CAAC"}
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CONTRACT = exports.LAWYER = void 0;
3
+ exports.CONTRACT = void 0;
4
4
  exports.guard = guard;
5
- exports.isAtomicBooleanFactory = guard;
6
5
  const RatifiedContract_1 = require("@jonloucks/contracts-ts/api/RatifiedContract");
7
6
  const Types_1 = require("@jonloucks/contracts-ts/api/Types");
8
7
  /**
@@ -12,29 +11,8 @@ const Types_1 = require("@jonloucks/contracts-ts/api/Types");
12
11
  * @returns true if the instance implements AtomicBooleanFactory
13
12
  */
14
13
  function guard(instance) {
15
- return (0, Types_1.hasFunctions)(instance, "create");
14
+ return (0, Types_1.guardFunctions)(instance, "createAtomicBoolean");
16
15
  }
17
- /**
18
- * For creating a Contract for AtomicBoolean with duck-typing checks.
19
- * @deprecated use CONTRACT instead
20
- */
21
- exports.LAWYER = new class {
22
- /**
23
- * Lawyer.isDeliverable override
24
- */
25
- isDeliverable(instance) {
26
- return guard(instance);
27
- }
28
- /**
29
- * Lawyer.createContract override
30
- */
31
- createContract(config) {
32
- const copy = { ...config ?? {} };
33
- copy.test ?? (copy.test = this.isDeliverable);
34
- copy.typeName ?? (copy.typeName = "AtomicBooleanFactory");
35
- return (0, RatifiedContract_1.create)(copy);
36
- }
37
- };
38
16
  /**
39
17
  * The factory Contract for creating new AtomicBoolean instances.
40
18
  */
@@ -1 +1 @@
1
- {"version":3,"file":"AtomicBooleanFactory.js","sourceRoot":"","sources":["../../src/auxiliary/AtomicBooleanFactory.ts"],"names":[],"mappings":";;;AAwBA,sBAEC;AAIiB,uCAAsB;AA5BxC,mFAAwF;AACxF,6DAA6F;AAe7F;;;;;GAKG;AACH,SAAgB,KAAK,CAAC,QAAiB;IACrC,OAAO,IAAA,oBAAY,EAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAC1C,CAAC;AAMD;;;GAGG;AACU,QAAA,MAAM,GAAiC,IAAI;IAEtD;;OAEG;IACH,aAAa,CAAiC,QAAiB;QAC7D,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,cAAc,CAAiC,MAA0B;QACvE,MAAM,IAAI,GAAsB,EAAE,GAAG,MAAM,IAAI,EAAE,EAAE,CAAC;QAEpD,IAAI,CAAC,IAAI,KAAT,IAAI,CAAC,IAAI,GAAK,IAAI,CAAC,aAAa,EAAC;QACjC,IAAI,CAAC,QAAQ,KAAb,IAAI,CAAC,QAAQ,GAAK,sBAAsB,EAAC;QAEzC,OAAO,IAAA,yBAAc,EAAI,IAAI,CAAC,CAAC;IACjC,CAAC;CACF,CAAC;AAEF;;GAEG;AACU,QAAA,QAAQ,GAAmC,IAAA,yBAAc,EAAC;IACrE,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,sBAAsB;CAC7B,CAAC,CAAC"}
1
+ {"version":3,"file":"AtomicBooleanFactory.js","sourceRoot":"","sources":["../../src/auxiliary/AtomicBooleanFactory.ts"],"names":[],"mappings":";;;AAuBA,sBAEC;AAxBD,mFAAwF;AACxF,6DAAiF;AAejF;;;;;GAKG;AACH,SAAgB,KAAK,CAAC,QAAiB;IACrC,OAAO,IAAA,sBAAc,EAAC,QAAQ,EAAE,qBAAqB,CAAC,CAAC;AACzD,CAAC;AAED;;GAEG;AACU,QAAA,QAAQ,GAAmC,IAAA,yBAAc,EAAC;IACrE,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,sBAAsB;CAC7B,CAAC,CAAC"}
@@ -1,5 +1,4 @@
1
- import { Lawyer } from "@jonloucks/contracts-ts/api/Lawyer";
2
- import { OptionalType } from "@jonloucks/contracts-ts/api/Types";
1
+ import { RequiredType } from "@jonloucks/contracts-ts/api/Types";
3
2
  /**
4
3
  * Responsibility: An atomic integer interface for thread-safe integer operations.
5
4
  */
@@ -42,13 +41,5 @@ export interface AtomicInteger {
42
41
  * @param instance the instance to check
43
42
  * @returns true if the instance implements AtomicInteger
44
43
  */
45
- export declare function guard(instance: unknown): instance is OptionalType<AtomicInteger>;
46
- /** @deprecated use guard instead
47
- */
48
- export { guard as isAtomicInteger };
49
- /**
50
- * For creating a Contract for AtomicInteger with duck-typing checks.
51
- * @deprecated create a contract using guard directly
52
- */
53
- export declare const LAWYER: Lawyer<AtomicInteger>;
44
+ export declare function guard(instance: unknown): instance is RequiredType<AtomicInteger>;
54
45
  //# sourceMappingURL=AtomicInteger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AtomicInteger.d.ts","sourceRoot":"","sources":["../../src/auxiliary/AtomicInteger.ts"],"names":[],"mappings":"AACA,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1B;;;OAGG;IACH,eAAe,IAAI,MAAM,CAAC;IAE1B;;;OAGG;IACH,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CACjE;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,YAAY,CAAC,aAAa,CAAC,CAEhF"}
@@ -1,9 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LAWYER = void 0;
4
3
  exports.guard = guard;
5
- exports.isAtomicInteger = guard;
6
- const RatifiedContract_1 = require("@jonloucks/contracts-ts/api/RatifiedContract");
7
4
  const Types_1 = require("@jonloucks/contracts-ts/api/Types");
8
5
  /**
9
6
  * Type guard for AtomicInteger interface.
@@ -12,27 +9,6 @@ const Types_1 = require("@jonloucks/contracts-ts/api/Types");
12
9
  * @returns true if the instance implements AtomicInteger
13
10
  */
14
11
  function guard(instance) {
15
- return (0, Types_1.hasFunctions)(instance, "compareAndSet", "incrementAndGet", "decrementAndGet", "get", "set");
12
+ return (0, Types_1.guardFunctions)(instance, "compareAndSet", "incrementAndGet", "decrementAndGet", "get", "set");
16
13
  }
17
- /**
18
- * For creating a Contract for AtomicInteger with duck-typing checks.
19
- * @deprecated create a contract using guard directly
20
- */
21
- exports.LAWYER = new class {
22
- /**
23
- * Lawyer.isDeliverable override
24
- */
25
- isDeliverable(instance) {
26
- return guard(instance);
27
- }
28
- /**
29
- * Lawyer.createContract override
30
- */
31
- createContract(config) {
32
- const copy = { ...config ?? {} };
33
- copy.test ?? (copy.test = this.isDeliverable);
34
- copy.typeName ?? (copy.typeName = "AtomicInteger");
35
- return (0, RatifiedContract_1.create)(copy);
36
- }
37
- };
38
14
  //# sourceMappingURL=AtomicInteger.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AtomicInteger.js","sourceRoot":"","sources":["../../src/auxiliary/AtomicInteger.ts"],"names":[],"mappings":";;;AAsDA,sBAEC;AAIiB,gCAAe;AA1DjC,mFAAwF;AACxF,6DAA+E;AA6C/E;;;;;GAKG;AACH,SAAgB,KAAK,CAAC,QAAiB;IACnC,OAAO,IAAA,oBAAY,EAAC,QAAQ,EAAE,eAAe,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AACvG,CAAC;AAMD;;;GAGG;AACU,QAAA,MAAM,GAA0B,IAAI;IAE7C;;OAEG;IACH,aAAa,CAA0B,QAAiB;QACpD,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,cAAc,CAA0B,MAA0B;QAC9D,MAAM,IAAI,GAAsB,EAAE,GAAG,MAAM,IAAI,EAAE,EAAE,CAAC;QAEpD,IAAI,CAAC,IAAI,KAAT,IAAI,CAAC,IAAI,GAAK,IAAI,CAAC,aAAa,EAAC;QACjC,IAAI,CAAC,QAAQ,KAAb,IAAI,CAAC,QAAQ,GAAK,eAAe,EAAC;QAElC,OAAO,IAAA,yBAAc,EAAI,IAAI,CAAC,CAAC;IACnC,CAAC;CACJ,CAAC"}
1
+ {"version":3,"file":"AtomicInteger.js","sourceRoot":"","sources":["../../src/auxiliary/AtomicInteger.ts"],"names":[],"mappings":";;AAmDA,sBAEC;AArDD,6DAAiF;AA6CjF;;;;;GAKG;AACH,SAAgB,KAAK,CAAC,QAAiB;IACnC,OAAO,IAAA,sBAAc,EAAC,QAAQ,EAAE,eAAe,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AACzG,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import { Contract } from "@jonloucks/contracts-ts/api/Contract";
2
- import { Lawyer } from "@jonloucks/contracts-ts/api/Lawyer";
3
- import { OptionalType, RequiredType } from "@jonloucks/contracts-ts/api/Types";
2
+ import { RequiredType } from "@jonloucks/contracts-ts/api/Types";
4
3
  import { AtomicInteger } from "@jonloucks/contracts-ts/auxiliary/AtomicInteger";
5
4
  /**
6
5
  * Factory interface for creating AtomicInteger instances.
@@ -10,7 +9,7 @@ export interface AtomicIntegerFactory {
10
9
  * Create a new AtomicInteger instance.
11
10
  * @param initialValue the initial value of the AtomicInteger
12
11
  */
13
- create(initialValue?: number): RequiredType<AtomicInteger>;
12
+ createAtomicInteger(initialValue?: number): RequiredType<AtomicInteger>;
14
13
  }
15
14
  /**
16
15
  * Type guard for AtomicIntegerFactory interface.
@@ -18,15 +17,7 @@ export interface AtomicIntegerFactory {
18
17
  * @param instance the instance to check
19
18
  * @returns true if the instance implements AtomicIntegerFactory
20
19
  */
21
- export declare function guard(instance: unknown): instance is OptionalType<AtomicIntegerFactory>;
22
- /** @deprecated use guard instead
23
- */
24
- export { guard as isAtomicIntegerFactory };
25
- /**
26
- * For creating a Contract for AtomicInteger with duck-typing checks.
27
- * @deprecated use createContract instead with guard
28
- */
29
- export declare const LAWYER: Lawyer<AtomicIntegerFactory>;
20
+ export declare function guard(instance: unknown): instance is RequiredType<AtomicIntegerFactory>;
30
21
  /**
31
22
  * The factory Contract for creating new AtomicInteger instances.
32
23
  */
@@ -1 +1 @@
1
- {"version":3,"file":"AtomicIntegerFactory.d.ts","sourceRoot":"","sources":["../../src/auxiliary/AtomicIntegerFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAA4B,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAgB,MAAM,mCAAmC,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AAEhF;;GAEG;AACH,MAAM,WAAW,oBAAoB;IAEjC;;;OAGG;IACH,MAAM,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC,aAAa,CAAC,CAAC;CAC9D;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,YAAY,CAAC,oBAAoB,CAAC,CAEvF;AAED;GACG;AACH,OAAO,EAAE,KAAK,IAAI,sBAAsB,EAAE,CAAA;AAE1C;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,oBAAoB,CAoB/C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,oBAAoB,CAGlD,CAAC"}
1
+ {"version":3,"file":"AtomicIntegerFactory.d.ts","sourceRoot":"","sources":["../../src/auxiliary/AtomicIntegerFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAEhE,OAAO,EAAE,YAAY,EAAkB,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AAEhF;;GAEG;AACH,MAAM,WAAW,oBAAoB;IAEjC;;;OAGG;IACH,mBAAmB,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC,aAAa,CAAC,CAAC;CAC3E;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,YAAY,CAAC,oBAAoB,CAAC,CAEvF;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,oBAAoB,CAGlD,CAAC"}
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CONTRACT = exports.LAWYER = void 0;
3
+ exports.CONTRACT = void 0;
4
4
  exports.guard = guard;
5
- exports.isAtomicIntegerFactory = guard;
6
5
  const RatifiedContract_1 = require("@jonloucks/contracts-ts/api/RatifiedContract");
7
6
  const Types_1 = require("@jonloucks/contracts-ts/api/Types");
8
7
  /**
@@ -12,29 +11,8 @@ const Types_1 = require("@jonloucks/contracts-ts/api/Types");
12
11
  * @returns true if the instance implements AtomicIntegerFactory
13
12
  */
14
13
  function guard(instance) {
15
- return (0, Types_1.hasFunctions)(instance, 'create');
14
+ return (0, Types_1.guardFunctions)(instance, 'createAtomicInteger');
16
15
  }
17
- /**
18
- * For creating a Contract for AtomicInteger with duck-typing checks.
19
- * @deprecated use createContract instead with guard
20
- */
21
- exports.LAWYER = new class {
22
- /**
23
- * Lawyer.isDeliverable override
24
- */
25
- isDeliverable(instance) {
26
- return guard(instance);
27
- }
28
- /**
29
- * Lawyer.createContract override
30
- */
31
- createContract(config) {
32
- const copy = { ...config ?? {} };
33
- copy.test ?? (copy.test = this.isDeliverable);
34
- copy.typeName ?? (copy.typeName = "AtomicIntegerFactory");
35
- return (0, RatifiedContract_1.create)(copy);
36
- }
37
- };
38
16
  /**
39
17
  * The factory Contract for creating new AtomicInteger instances.
40
18
  */
@@ -1 +1 @@
1
- {"version":3,"file":"AtomicIntegerFactory.js","sourceRoot":"","sources":["../../src/auxiliary/AtomicIntegerFactory.ts"],"names":[],"mappings":";;;AAwBA,sBAEC;AAIiB,uCAAsB;AA5BxC,mFAAwF;AACxF,6DAA6F;AAe7F;;;;;GAKG;AACH,SAAgB,KAAK,CAAC,QAAiB;IACnC,OAAO,IAAA,oBAAY,EAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAC5C,CAAC;AAMD;;;GAGG;AACU,QAAA,MAAM,GAAiC,IAAI;IAEpD;;OAEG;IACH,aAAa,CAAiC,QAAiB;QAC3D,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,cAAc,CAAiC,MAA0B;QACrE,MAAM,IAAI,GAAsB,EAAE,GAAG,MAAM,IAAI,EAAE,EAAE,CAAC;QAEpD,IAAI,CAAC,IAAI,KAAT,IAAI,CAAC,IAAI,GAAK,IAAI,CAAC,aAAa,EAAC;QACjC,IAAI,CAAC,QAAQ,KAAb,IAAI,CAAC,QAAQ,GAAK,sBAAsB,EAAC;QAEzC,OAAO,IAAA,yBAAc,EAAI,IAAI,CAAC,CAAC;IACnC,CAAC;CACJ,CAAC;AAEF;;GAEG;AACU,QAAA,QAAQ,GAAmC,IAAA,yBAAc,EAAC;IACnE,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,sBAAsB;CAC/B,CAAC,CAAC"}
1
+ {"version":3,"file":"AtomicIntegerFactory.js","sourceRoot":"","sources":["../../src/auxiliary/AtomicIntegerFactory.ts"],"names":[],"mappings":";;;AAuBA,sBAEC;AAxBD,mFAAwF;AACxF,6DAAiF;AAejF;;;;;GAKG;AACH,SAAgB,KAAK,CAAC,QAAiB;IACnC,OAAO,IAAA,sBAAc,EAAC,QAAQ,EAAE,qBAAqB,CAAC,CAAC;AAC3D,CAAC;AAED;;GAEG;AACU,QAAA,QAAQ,GAAmC,IAAA,yBAAc,EAAC;IACnE,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,sBAAsB;CAC/B,CAAC,CAAC"}
@@ -1,5 +1,4 @@
1
- import { Lawyer } from "@jonloucks/contracts-ts/api/Lawyer";
2
- import { OptionalType } from "@jonloucks/contracts-ts/api/Types";
1
+ import { OptionalType, RequiredType } from "@jonloucks/contracts-ts/api/Types";
3
2
  /**
4
3
  * Responsibility: An atomic reference interface for thread-safe reference operations.
5
4
  * Note: typescript limitations prevent full atomicity guarantees.
@@ -28,13 +27,5 @@ export interface AtomicReference<T> {
28
27
  * @param instance the instance to check
29
28
  * @returns true if the instance implements AtomicReference
30
29
  */
31
- export declare function guard<T>(instance: unknown): instance is OptionalType<AtomicReference<T>>;
32
- /** @deprecated use guard instead
33
- */
34
- export { guard as isAtomicReference };
35
- /**
36
- * For creating a Contract for AtomicReference with duck-typing checks.
37
- * @deprecated create a contract using typeGuard directly
38
- */
39
- export declare const LAWYER: Lawyer<AtomicReference<unknown>>;
30
+ export declare function guard<T>(instance: unknown): instance is RequiredType<AtomicReference<T>>;
40
31
  //# sourceMappingURL=AtomicReference.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AtomicReference.d.ts","sourceRoot":"","sources":["../../src/auxiliary/AtomicReference.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAgB,MAAM,mCAAmC,CAAC;AAE/E;;;GAGG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC;IAE9B;;OAEG;IACH,GAAG,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC;IAEvB;;;OAGG;IACH,GAAG,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;IAEpC;;;;;OAKG;IACH,aAAa,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC;CACrF;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,YAAY,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAExF;AAED;GACG;AACH,OAAO,EAAE,KAAK,IAAI,iBAAiB,EAAE,CAAA;AAErC;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAoBnD,CAAA"}
1
+ {"version":3,"file":"AtomicReference.d.ts","sourceRoot":"","sources":["../../src/auxiliary/AtomicReference.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,mCAAmC,CAAC;AAE/F;;;GAGG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC;IAE9B;;OAEG;IACH,GAAG,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC;IAEvB;;;OAGG;IACH,GAAG,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;IAEpC;;;;;OAKG;IACH,aAAa,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC;CACrF;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,YAAY,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAExF"}
@@ -1,9 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LAWYER = void 0;
4
3
  exports.guard = guard;
5
- exports.isAtomicReference = guard;
6
- const RatifiedContract_1 = require("@jonloucks/contracts-ts/api/RatifiedContract");
7
4
  const Types_1 = require("@jonloucks/contracts-ts/api/Types");
8
5
  /**
9
6
  * Type guard for AtomicReference interface.
@@ -12,27 +9,6 @@ const Types_1 = require("@jonloucks/contracts-ts/api/Types");
12
9
  * @returns true if the instance implements AtomicReference
13
10
  */
14
11
  function guard(instance) {
15
- return (0, Types_1.hasFunctions)(instance, "compareAndSet", "get", "set");
12
+ return (0, Types_1.guardFunctions)(instance, "compareAndSet", "get", "set");
16
13
  }
17
- /**
18
- * For creating a Contract for AtomicReference with duck-typing checks.
19
- * @deprecated create a contract using typeGuard directly
20
- */
21
- exports.LAWYER = new class {
22
- /**
23
- * Lawyer.isDeliverable override
24
- */
25
- isDeliverable(instance) {
26
- return guard(instance);
27
- }
28
- /**
29
- * Lawyer.createContract override
30
- */
31
- createContract(config) {
32
- const copy = { ...config ?? {} };
33
- copy.test ?? (copy.test = this.isDeliverable);
34
- copy.typeName ?? (copy.typeName = "AtomicReference");
35
- return (0, RatifiedContract_1.create)(copy);
36
- }
37
- };
38
14
  //# sourceMappingURL=AtomicReference.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AtomicReference.js","sourceRoot":"","sources":["../../src/auxiliary/AtomicReference.ts"],"names":[],"mappings":";;;AAqCA,sBAEC;AAIiB,kCAAiB;AAzCnC,mFAAwF;AACxF,6DAA+E;AA4B/E;;;;;GAKG;AACH,SAAgB,KAAK,CAAI,QAAiB;IACtC,OAAO,IAAA,oBAAY,EAAC,QAAQ,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AACjE,CAAC;AAMD;;;GAGG;AACU,QAAA,MAAM,GAAqC,IAAI;IAExD;;OAEG;IACH,aAAa,CAAqC,QAAiB;QAC/D,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,cAAc,CAAqC,MAA0B;QACzE,MAAM,IAAI,GAAsB,EAAE,GAAG,MAAM,IAAI,EAAE,EAAE,CAAC;QAEpD,IAAI,CAAC,IAAI,KAAT,IAAI,CAAC,IAAI,GAAK,IAAI,CAAC,aAAa,EAAC;QACjC,IAAI,CAAC,QAAQ,KAAb,IAAI,CAAC,QAAQ,GAAK,iBAAiB,EAAC;QAEpC,OAAO,IAAA,yBAAc,EAAI,IAAI,CAAC,CAAC;IACnC,CAAC;CACJ,CAAA"}
1
+ {"version":3,"file":"AtomicReference.js","sourceRoot":"","sources":["../../src/auxiliary/AtomicReference.ts"],"names":[],"mappings":";;AAkCA,sBAEC;AApCD,6DAA+F;AA4B/F;;;;;GAKG;AACH,SAAgB,KAAK,CAAI,QAAiB;IACtC,OAAO,IAAA,sBAAc,EAAC,QAAQ,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AACnE,CAAC"}