inferred-types 0.40.6 → 0.41.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 (571) hide show
  1. package/dist/constants/Comma.js +1 -1
  2. package/dist/constants/Never.js +1 -1
  3. package/dist/constants/NoDefaultValue.js +1 -1
  4. package/dist/constants/NotDefined.js +1 -1
  5. package/dist/constants/TypeComparisons.js +1 -1
  6. package/dist/constants/index.js +22 -22
  7. package/dist/constants/tsconfig.tsbuildinfo +1 -1
  8. package/dist/inferred-types/index.js +3 -3
  9. package/dist/inferred-types/tsconfig.tsbuildinfo +1 -1
  10. package/dist/runtime/boolean-logic/ifChar.js +1 -1
  11. package/dist/runtime/boolean-logic/index.js +19 -19
  12. package/dist/runtime/combinators/index.js +3 -3
  13. package/dist/runtime/dictionary/get.d.ts.map +1 -1
  14. package/dist/runtime/dictionary/get.js +3 -3
  15. package/dist/runtime/dictionary/index.d.ts +0 -2
  16. package/dist/runtime/dictionary/index.d.ts.map +1 -1
  17. package/dist/runtime/dictionary/index.js +11 -13
  18. package/dist/runtime/dictionary/withKeys.d.ts +1 -1
  19. package/dist/runtime/dictionary/withoutKeys.d.ts +1 -1
  20. package/dist/runtime/errors/index.js +1 -1
  21. package/dist/runtime/functional/index.js +2 -2
  22. package/dist/runtime/functions/index.js +1 -1
  23. package/dist/runtime/index.js +14 -14
  24. package/dist/runtime/initializers/index.js +8 -8
  25. package/dist/runtime/lists/createConverter.d.ts.map +1 -1
  26. package/dist/runtime/lists/createConverter.js +1 -1
  27. package/dist/runtime/lists/find.d.ts.map +1 -1
  28. package/dist/runtime/lists/find.js +10 -2
  29. package/dist/runtime/lists/getEach.js +1 -1
  30. package/dist/runtime/lists/index.js +15 -15
  31. package/dist/runtime/lists/indexOf.d.ts.map +1 -1
  32. package/dist/runtime/lists/indexOf.js +9 -10
  33. package/dist/runtime/lists/unique.d.ts +2 -2
  34. package/dist/runtime/lists/unique.d.ts.map +1 -1
  35. package/dist/runtime/lists/unique.js +10 -15
  36. package/dist/runtime/literals/ifLowercase.js +1 -1
  37. package/dist/runtime/literals/ifUppercase.js +1 -1
  38. package/dist/runtime/literals/index.d.ts +1 -0
  39. package/dist/runtime/literals/index.d.ts.map +1 -1
  40. package/dist/runtime/literals/index.js +31 -30
  41. package/dist/runtime/literals/pluralize.d.ts.map +1 -1
  42. package/dist/runtime/literals/pluralize.js +2 -2
  43. package/dist/runtime/literals/split.d.ts +1 -1
  44. package/dist/runtime/literals/split.d.ts.map +1 -1
  45. package/dist/runtime/literals/split.js +1 -7
  46. package/dist/runtime/literals/stripBefore.d.ts +15 -0
  47. package/dist/runtime/literals/stripBefore.d.ts.map +1 -0
  48. package/dist/runtime/literals/stripBefore.js +18 -0
  49. package/dist/runtime/runtime-types/createType.js +1 -1
  50. package/dist/runtime/runtime-types/describeType.js +1 -1
  51. package/dist/runtime/runtime-types/index.d.ts +0 -2
  52. package/dist/runtime/runtime-types/index.d.ts.map +1 -1
  53. package/dist/runtime/runtime-types/index.js +6 -8
  54. package/dist/runtime/runtime-types/kind.d.ts +1 -1
  55. package/dist/runtime/runtime-types/typeTuples.d.ts +1 -1
  56. package/dist/runtime/runtime-types/typeTuples.js +1 -1
  57. package/dist/runtime/sets/index.js +1 -1
  58. package/dist/runtime/state/index.js +2 -2
  59. package/dist/runtime/tsconfig.tsbuildinfo +1 -1
  60. package/dist/runtime/type-conversion/index.js +9 -9
  61. package/dist/runtime/type-guards/higher-order/endsWith.js +1 -1
  62. package/dist/runtime/type-guards/higher-order/index.js +6 -6
  63. package/dist/runtime/type-guards/higher-order/isEqual.js +1 -1
  64. package/dist/runtime/type-guards/higher-order/isLength.js +1 -1
  65. package/dist/runtime/type-guards/higher-order/startsWith.js +1 -1
  66. package/dist/runtime/type-guards/index.d.ts +0 -1
  67. package/dist/runtime/type-guards/index.d.ts.map +1 -1
  68. package/dist/runtime/type-guards/index.js +32 -33
  69. package/dist/runtime/type-guards/isAlpha.js +1 -1
  70. package/dist/runtime/type-guards/isArray.d.ts +1 -1
  71. package/dist/runtime/type-guards/isArray.d.ts.map +1 -1
  72. package/dist/runtime/type-guards/isFalsy.js +1 -1
  73. package/dist/runtime/type-guards/isNumericString.d.ts.map +1 -1
  74. package/dist/runtime/type-guards/isNumericString.js +2 -1
  75. package/dist/runtime/type-guards/isRef.d.ts +1 -1
  76. package/dist/runtime/type-guards/isRef.d.ts.map +1 -1
  77. package/dist/runtime/type-guards/isTruthy.js +1 -1
  78. package/dist/runtime/type-guards/isTypeToken.js +1 -1
  79. package/dist/runtime/type-guards/runtime-type-guards.js +1 -1
  80. package/dist/types/base-types/AnyFunction.d.ts.map +1 -1
  81. package/dist/types/base-types/Container.d.ts.map +1 -1
  82. package/dist/types/base-types/CouldHaveValue.d.ts.map +1 -1
  83. package/dist/types/base-types/Digital.d.ts.map +1 -1
  84. package/dist/types/base-types/Indexable.d.ts.map +1 -1
  85. package/dist/types/base-types/IndexableObject.d.ts.map +1 -1
  86. package/dist/types/base-types/IndexedObject.d.ts.map +1 -1
  87. package/dist/types/base-types/NarrowObject.d.ts.map +1 -1
  88. package/dist/types/base-types/Tuple.d.ts.map +1 -1
  89. package/dist/types/base-types/fns/NarrowingFn.d.ts +1 -1
  90. package/dist/types/base-types/fns/NarrowingFn.d.ts.map +1 -1
  91. package/dist/types/base-types/fns/index.js +3 -3
  92. package/dist/types/base-types/functional/index.js +1 -1
  93. package/dist/types/base-types/index.js +24 -24
  94. package/dist/types/boolean-logic/branching/IfAllExtend.d.ts.map +1 -1
  95. package/dist/types/boolean-logic/branching/IfAllLiteral.d.ts +1 -2
  96. package/dist/types/boolean-logic/branching/IfAllLiteral.d.ts.map +1 -1
  97. package/dist/types/boolean-logic/branching/IfAnd.d.ts +5 -2
  98. package/dist/types/boolean-logic/branching/IfAnd.d.ts.map +1 -1
  99. package/dist/types/boolean-logic/branching/IfArray.d.ts.map +1 -1
  100. package/dist/types/boolean-logic/branching/IfBoolean.d.ts.map +1 -1
  101. package/dist/types/boolean-logic/branching/IfBooleanLiteral.d.ts.map +1 -1
  102. package/dist/types/boolean-logic/branching/IfChar.d.ts.map +1 -1
  103. package/dist/types/boolean-logic/branching/IfContainer.d.ts.map +1 -1
  104. package/dist/types/boolean-logic/branching/IfContains.d.ts.map +1 -1
  105. package/dist/types/boolean-logic/branching/IfDotPath.d.ts.map +1 -1
  106. package/dist/types/boolean-logic/branching/IfEmptyObject.d.ts.map +1 -1
  107. package/dist/types/boolean-logic/branching/IfEqual.d.ts.map +1 -1
  108. package/dist/types/boolean-logic/branching/IfErrorCondition.d.ts.map +1 -1
  109. package/dist/types/boolean-logic/branching/IfExtends.d.ts.map +1 -1
  110. package/dist/types/boolean-logic/branching/IfExtendsAll.d.ts.map +1 -1
  111. package/dist/types/boolean-logic/branching/IfExtendsSome.d.ts.map +1 -1
  112. package/dist/types/boolean-logic/branching/IfFalse.d.ts.map +1 -1
  113. package/dist/types/boolean-logic/branching/IfFalsy.d.ts.map +1 -1
  114. package/dist/types/boolean-logic/branching/IfFnWithParams.d.ts.map +1 -1
  115. package/dist/types/boolean-logic/branching/IfFnWithoutParams.d.ts.map +1 -1
  116. package/dist/types/boolean-logic/branching/IfFunction.d.ts.map +1 -1
  117. package/dist/types/boolean-logic/branching/IfGreaterThan.d.ts.map +1 -1
  118. package/dist/types/boolean-logic/branching/IfHasCharacters.d.ts.map +1 -1
  119. package/dist/types/boolean-logic/branching/IfLength.d.ts.map +1 -1
  120. package/dist/types/boolean-logic/branching/IfLessThan.d.ts +10 -0
  121. package/dist/types/boolean-logic/branching/IfLessThan.d.ts.map +1 -0
  122. package/dist/types/boolean-logic/branching/IfLiteral.d.ts.map +1 -1
  123. package/dist/types/boolean-logic/branching/IfMaybeFalse.d.ts.map +1 -1
  124. package/dist/types/boolean-logic/branching/IfMaybeTrue.d.ts.map +1 -1
  125. package/dist/types/boolean-logic/branching/IfNarrowlyContains.d.ts.map +1 -1
  126. package/dist/types/boolean-logic/branching/IfNegativeNumber.d.ts +10 -0
  127. package/dist/types/boolean-logic/branching/IfNegativeNumber.d.ts.map +1 -0
  128. package/dist/types/boolean-logic/branching/IfNever.d.ts +1 -1
  129. package/dist/types/boolean-logic/branching/IfNever.d.ts.map +1 -1
  130. package/dist/types/boolean-logic/branching/IfNotEqual.d.ts.map +1 -1
  131. package/dist/types/boolean-logic/branching/IfNotLiteral.d.ts.map +1 -1
  132. package/dist/types/boolean-logic/branching/IfNotNever.d.ts.map +1 -1
  133. package/dist/types/boolean-logic/branching/IfNotTuple.d.ts +8 -0
  134. package/dist/types/boolean-logic/branching/IfNotTuple.d.ts.map +1 -0
  135. package/dist/types/boolean-logic/branching/IfNull.d.ts.map +1 -1
  136. package/dist/types/boolean-logic/branching/IfNumber.d.ts.map +1 -1
  137. package/dist/types/boolean-logic/branching/IfNumericLiteral.d.ts.map +1 -1
  138. package/dist/types/boolean-logic/branching/IfObject.d.ts.map +1 -1
  139. package/dist/types/boolean-logic/branching/IfObjectLiteral.d.ts.map +1 -1
  140. package/dist/types/boolean-logic/branching/IfOptionalScalar.d.ts.map +1 -1
  141. package/dist/types/boolean-logic/branching/IfOr.d.ts.map +1 -1
  142. package/dist/types/boolean-logic/branching/IfPositive.d.ts +10 -0
  143. package/dist/types/boolean-logic/branching/IfPositive.d.ts.map +1 -0
  144. package/dist/types/boolean-logic/branching/IfReadonlyArray.d.ts.map +1 -1
  145. package/dist/types/boolean-logic/branching/IfReadonlyObject.d.ts.map +1 -1
  146. package/dist/types/boolean-logic/branching/IfRef.d.ts.map +1 -1
  147. package/dist/types/boolean-logic/branching/IfReturns.d.ts.map +1 -1
  148. package/dist/types/boolean-logic/branching/IfScalar.d.ts.map +1 -1
  149. package/dist/types/boolean-logic/branching/IfSingularNoun.d.ts.map +1 -1
  150. package/dist/types/boolean-logic/branching/IfSomeEqual.d.ts.map +1 -1
  151. package/dist/types/boolean-logic/branching/IfSomeExtend.d.ts.map +1 -1
  152. package/dist/types/boolean-logic/branching/IfSomeTruthy.d.ts +1 -2
  153. package/dist/types/boolean-logic/branching/IfSomeTruthy.d.ts.map +1 -1
  154. package/dist/types/boolean-logic/branching/IfStartsWith.d.ts.map +1 -1
  155. package/dist/types/boolean-logic/branching/IfString.d.ts.map +1 -1
  156. package/dist/types/boolean-logic/branching/IfStringLiteral.d.ts +13 -2
  157. package/dist/types/boolean-logic/branching/IfStringLiteral.d.ts.map +1 -1
  158. package/dist/types/boolean-logic/branching/IfSymbol.d.ts.map +1 -1
  159. package/dist/types/boolean-logic/branching/IfTrue.d.ts.map +1 -1
  160. package/dist/types/boolean-logic/branching/IfTruthy.d.ts.map +1 -1
  161. package/dist/types/boolean-logic/branching/IfTuple.d.ts.map +1 -1
  162. package/dist/types/boolean-logic/branching/IfUndefined.d.ts.map +1 -1
  163. package/dist/types/boolean-logic/branching/IfUnion.d.ts.map +1 -1
  164. package/dist/types/boolean-logic/branching/IfValidDotPath.d.ts.map +1 -1
  165. package/dist/types/boolean-logic/branching/IfWide.d.ts.map +1 -1
  166. package/dist/types/boolean-logic/branching/index.d.ts +3 -0
  167. package/dist/types/boolean-logic/branching/index.d.ts.map +1 -1
  168. package/dist/types/boolean-logic/branching/index.js +69 -66
  169. package/dist/types/boolean-logic/combinators/And.d.ts.map +1 -1
  170. package/dist/types/boolean-logic/combinators/Not.d.ts +7 -6
  171. package/dist/types/boolean-logic/combinators/Not.d.ts.map +1 -1
  172. package/dist/types/boolean-logic/combinators/Or.d.ts.map +1 -1
  173. package/dist/types/boolean-logic/combinators/index.js +3 -3
  174. package/dist/types/boolean-logic/index.js +5 -5
  175. package/dist/types/boolean-logic/narrowing/index.d.ts +0 -1
  176. package/dist/types/boolean-logic/narrowing/index.d.ts.map +1 -1
  177. package/dist/types/boolean-logic/narrowing/index.js +1 -2
  178. package/dist/types/boolean-logic/operators/AllExtend.d.ts +1 -2
  179. package/dist/types/boolean-logic/operators/AllExtend.d.ts.map +1 -1
  180. package/dist/types/boolean-logic/operators/Contains.d.ts.map +1 -1
  181. package/dist/types/boolean-logic/operators/ContainsAll.d.ts.map +1 -1
  182. package/dist/types/boolean-logic/operators/EndsWith.d.ts.map +1 -1
  183. package/dist/types/boolean-logic/operators/ExtendsAll.d.ts.map +1 -1
  184. package/dist/types/boolean-logic/operators/ExtendsNone.d.ts.map +1 -1
  185. package/dist/types/boolean-logic/operators/ExtendsSome.d.ts.map +1 -1
  186. package/dist/types/boolean-logic/operators/HasCharacters.d.ts.map +1 -1
  187. package/dist/types/boolean-logic/operators/HasParameters.d.ts.map +1 -1
  188. package/dist/types/boolean-logic/operators/HasSameValues.d.ts.map +1 -1
  189. package/dist/types/boolean-logic/operators/HasUnionType.d.ts.map +1 -1
  190. package/dist/types/boolean-logic/operators/Includes.d.ts.map +1 -1
  191. package/dist/types/boolean-logic/operators/IsAllLowercase.d.ts.map +1 -1
  192. package/dist/types/boolean-logic/operators/IsAny.d.ts.map +1 -1
  193. package/dist/types/boolean-logic/operators/IsAnyEqual.d.ts.map +1 -1
  194. package/dist/types/boolean-logic/operators/IsBooleanLiteral.d.ts.map +1 -1
  195. package/dist/types/boolean-logic/operators/IsChar.d.ts.map +1 -1
  196. package/dist/types/boolean-logic/operators/IsContainer.d.ts.map +1 -1
  197. package/dist/types/boolean-logic/operators/IsDefined.d.ts +7 -0
  198. package/dist/types/boolean-logic/operators/IsDefined.d.ts.map +1 -0
  199. package/dist/types/boolean-logic/operators/IsDefined.js +1 -0
  200. package/dist/types/boolean-logic/operators/IsDotPath.d.ts.map +1 -1
  201. package/dist/types/boolean-logic/operators/IsEmptyObject.d.ts.map +1 -1
  202. package/dist/types/boolean-logic/operators/IsErrorCondition.d.ts.map +1 -1
  203. package/dist/types/boolean-logic/operators/IsFalse.d.ts.map +1 -1
  204. package/dist/types/boolean-logic/operators/IsFalsy.d.ts.map +1 -1
  205. package/dist/types/boolean-logic/operators/IsFnWithParams.d.ts.map +1 -1
  206. package/dist/types/boolean-logic/operators/IsFunction.d.ts.map +1 -1
  207. package/dist/types/boolean-logic/operators/IsGreaterThan.d.ts.map +1 -1
  208. package/dist/types/boolean-logic/operators/IsLength.d.ts +1 -2
  209. package/dist/types/boolean-logic/operators/IsLength.d.ts.map +1 -1
  210. package/dist/types/boolean-logic/operators/IsLiteral.d.ts.map +1 -1
  211. package/dist/types/boolean-logic/operators/IsMaybeTrue.d.ts.map +1 -1
  212. package/dist/types/boolean-logic/operators/IsNegativeNumber.d.ts +5 -4
  213. package/dist/types/boolean-logic/operators/IsNegativeNumber.d.ts.map +1 -1
  214. package/dist/types/boolean-logic/operators/IsNotEqual.d.ts.map +1 -1
  215. package/dist/types/boolean-logic/operators/IsNumericLiteral.d.ts.map +1 -1
  216. package/dist/types/boolean-logic/operators/IsObject.d.ts.map +1 -1
  217. package/dist/types/boolean-logic/operators/IsObjectLiteral.d.ts.map +1 -1
  218. package/dist/types/boolean-logic/operators/IsOptionalScalar.d.ts +2 -2
  219. package/dist/types/boolean-logic/operators/IsOptionalScalar.d.ts.map +1 -1
  220. package/dist/types/boolean-logic/operators/IsRef.d.ts.map +1 -1
  221. package/dist/types/boolean-logic/operators/IsScalar.d.ts +7 -3
  222. package/dist/types/boolean-logic/operators/IsScalar.d.ts.map +1 -1
  223. package/dist/types/boolean-logic/operators/IsSingularNoun.d.ts.map +1 -1
  224. package/dist/types/boolean-logic/operators/IsStringLiteral.d.ts.map +1 -1
  225. package/dist/types/boolean-logic/operators/IsTrue.d.ts.map +1 -1
  226. package/dist/types/boolean-logic/operators/IsTruthy.d.ts.map +1 -1
  227. package/dist/types/boolean-logic/operators/IsTuple.d.ts +2 -2
  228. package/dist/types/boolean-logic/operators/IsTuple.d.ts.map +1 -1
  229. package/dist/types/boolean-logic/operators/IsUnion.d.ts +1 -1
  230. package/dist/types/boolean-logic/operators/IsUnion.d.ts.map +1 -1
  231. package/dist/types/boolean-logic/operators/IsValidDotPath.d.ts.map +1 -1
  232. package/dist/types/boolean-logic/operators/IsValidKey.d.ts.map +1 -1
  233. package/dist/types/boolean-logic/operators/IsWideType.d.ts.map +1 -1
  234. package/dist/types/boolean-logic/operators/NarrowlyContains.d.ts +1 -2
  235. package/dist/types/boolean-logic/operators/NarrowlyContains.d.ts.map +1 -1
  236. package/dist/types/boolean-logic/operators/NotCharacters.d.ts.map +1 -1
  237. package/dist/types/boolean-logic/operators/NotEqual.d.ts.map +1 -1
  238. package/dist/types/boolean-logic/operators/NotLength.d.ts.map +1 -1
  239. package/dist/types/boolean-logic/operators/Returns.d.ts.map +1 -1
  240. package/dist/types/boolean-logic/operators/ReturnsBoolean.d.ts.map +1 -1
  241. package/dist/types/boolean-logic/operators/ReturnsFalse.d.ts.map +1 -1
  242. package/dist/types/boolean-logic/operators/ReturnsTrue.d.ts.map +1 -1
  243. package/dist/types/boolean-logic/operators/SomeEqual.d.ts +1 -2
  244. package/dist/types/boolean-logic/operators/SomeEqual.d.ts.map +1 -1
  245. package/dist/types/boolean-logic/operators/SomeExtend.d.ts +2 -3
  246. package/dist/types/boolean-logic/operators/SomeExtend.d.ts.map +1 -1
  247. package/dist/types/boolean-logic/operators/StartsWith.d.ts.map +1 -1
  248. package/dist/types/boolean-logic/operators/index.d.ts +1 -0
  249. package/dist/types/boolean-logic/operators/index.d.ts.map +1 -1
  250. package/dist/types/boolean-logic/operators/index.js +75 -74
  251. package/dist/types/classes/index.js +1 -1
  252. package/dist/types/containers/WithKey.d.ts +16 -6
  253. package/dist/types/containers/WithKey.d.ts.map +1 -1
  254. package/dist/types/containers/index.js +3 -3
  255. package/dist/types/dictionary/AddKeyValue.d.ts.map +1 -1
  256. package/dist/types/dictionary/CombinedKeys.d.ts +19 -0
  257. package/dist/types/dictionary/CombinedKeys.d.ts.map +1 -0
  258. package/dist/types/dictionary/CombinedKeys.js +1 -0
  259. package/dist/types/dictionary/DictChangeValue.d.ts.map +1 -1
  260. package/dist/types/dictionary/ExplicitKeys.d.ts.map +1 -1
  261. package/dist/types/dictionary/FromMaybeRef.d.ts.map +1 -1
  262. package/dist/types/dictionary/Keys.d.ts +1 -1
  263. package/dist/types/dictionary/Keys.d.ts.map +1 -1
  264. package/dist/types/dictionary/KeysEqualValue.d.ts.map +1 -1
  265. package/dist/types/dictionary/KeysNotEqualValue.d.ts.map +1 -1
  266. package/dist/types/dictionary/KeysWithValue.d.ts +2 -2
  267. package/dist/types/dictionary/KeysWithValue.d.ts.map +1 -1
  268. package/dist/types/dictionary/KeysWithoutValue.d.ts.map +1 -1
  269. package/dist/types/dictionary/MapTo.d.ts.map +1 -1
  270. package/dist/types/dictionary/MaybeRef.d.ts.map +1 -1
  271. package/dist/types/dictionary/MutableProps.d.ts.map +1 -1
  272. package/dist/types/dictionary/NonStringKeys.d.ts +1 -1
  273. package/dist/types/dictionary/NonStringKeys.d.ts.map +1 -1
  274. package/dist/types/dictionary/OptionalProps.d.ts.map +1 -1
  275. package/dist/types/dictionary/PrivateKeys.d.ts.map +1 -1
  276. package/dist/types/dictionary/ReadonlyProps.d.ts.map +1 -1
  277. package/dist/types/dictionary/RemoveIndexKeys.d.ts +2 -2
  278. package/dist/types/dictionary/RemoveIndexKeys.d.ts.map +1 -1
  279. package/dist/types/dictionary/RequireProps.d.ts.map +1 -1
  280. package/dist/types/dictionary/RequiredKeys.d.ts.map +1 -1
  281. package/dist/types/dictionary/RequiredProps.d.ts.map +1 -1
  282. package/dist/types/dictionary/SharedKeys.d.ts.map +1 -1
  283. package/dist/types/dictionary/SimplifyObject.d.ts.map +1 -1
  284. package/dist/types/dictionary/UpsertKeyValue.d.ts.map +1 -1
  285. package/dist/types/dictionary/ValidKey.d.ts.map +1 -1
  286. package/dist/types/dictionary/WithKeys.d.ts.map +1 -1
  287. package/dist/types/dictionary/WithNumericKeys.d.ts.map +1 -1
  288. package/dist/types/dictionary/WithStringKeys.d.ts.map +1 -1
  289. package/dist/types/dictionary/WithValue.d.ts +4 -2
  290. package/dist/types/dictionary/WithValue.d.ts.map +1 -1
  291. package/dist/types/dictionary/WithoutKeys.d.ts.map +1 -1
  292. package/dist/types/dictionary/WithoutValue.d.ts.map +1 -1
  293. package/dist/types/dictionary/index.d.ts +1 -0
  294. package/dist/types/dictionary/index.d.ts.map +1 -1
  295. package/dist/types/dictionary/index.js +41 -40
  296. package/dist/types/errors/ErrorConditionHandler.d.ts.map +1 -1
  297. package/dist/types/errors/ReportError.d.ts.map +1 -1
  298. package/dist/types/errors/index.js +4 -4
  299. package/dist/types/functional/Left.d.ts.map +1 -1
  300. package/dist/types/functional/Right.d.ts.map +1 -1
  301. package/dist/types/functional/index.js +2 -2
  302. package/dist/types/functions/AsFnMeta.d.ts.map +1 -1
  303. package/dist/types/functions/FnMeta.d.ts.map +1 -1
  304. package/dist/types/functions/FnProps.d.ts.map +1 -1
  305. package/dist/types/functions/PromiseAll.d.ts.map +1 -1
  306. package/dist/types/functions/RemoveFnProps.d.ts.map +1 -1
  307. package/dist/types/functions/ToFn.d.ts.map +1 -1
  308. package/dist/types/functions/TypeGuard.d.ts.map +1 -1
  309. package/dist/types/functions/index.js +9 -9
  310. package/dist/types/index.js +17 -17
  311. package/dist/types/kv/KeyValue.d.ts.map +1 -1
  312. package/dist/types/kv/index.js +4 -4
  313. package/dist/types/lists/AfterFirst.d.ts.map +1 -1
  314. package/dist/types/lists/ArrayElementType.d.ts +1 -2
  315. package/dist/types/lists/ArrayElementType.d.ts.map +1 -1
  316. package/dist/types/lists/AsArray.d.ts +0 -2
  317. package/dist/types/lists/AsArray.d.ts.map +1 -1
  318. package/dist/types/lists/AsTuple.d.ts +12 -0
  319. package/dist/types/lists/AsTuple.d.ts.map +1 -0
  320. package/dist/types/lists/AsTuple.js +1 -0
  321. package/dist/types/lists/BeforeLast.d.ts.map +1 -1
  322. package/dist/types/lists/ConvertAndMap.d.ts.map +1 -1
  323. package/dist/types/lists/ConvertSet.d.ts.map +1 -1
  324. package/dist/types/lists/Filter.d.ts.map +1 -1
  325. package/dist/types/lists/Find.d.ts.map +1 -1
  326. package/dist/types/lists/First.d.ts +1 -2
  327. package/dist/types/lists/First.d.ts.map +1 -1
  328. package/dist/types/lists/FirstOrElse.d.ts.map +1 -1
  329. package/dist/types/lists/Flatten.d.ts +1 -2
  330. package/dist/types/lists/Flatten.d.ts.map +1 -1
  331. package/dist/types/lists/GetEach.d.ts.map +1 -1
  332. package/dist/types/lists/IndexOf.d.ts.map +1 -1
  333. package/dist/types/lists/IntersectAll.d.ts.map +1 -1
  334. package/dist/types/lists/Last.d.ts.map +1 -1
  335. package/dist/types/lists/Length.d.ts +2 -2
  336. package/dist/types/lists/Length.d.ts.map +1 -1
  337. package/dist/types/lists/NumericKeys.d.ts.map +1 -1
  338. package/dist/types/lists/Pop.d.ts.map +1 -1
  339. package/dist/types/lists/ReplaceLast.d.ts.map +1 -1
  340. package/dist/types/lists/Retain.d.ts.map +1 -1
  341. package/dist/types/lists/ReturnTypes.d.ts.map +1 -1
  342. package/dist/types/lists/Reverse.d.ts.map +1 -1
  343. package/dist/types/lists/Shift.d.ts.map +1 -1
  344. package/dist/types/lists/TruthyReturns.d.ts.map +1 -1
  345. package/dist/types/lists/UnionFromProp.d.ts.map +1 -1
  346. package/dist/types/lists/extractors/2nd-order/RemoveEquals.d.ts.map +1 -1
  347. package/dist/types/lists/extractors/2nd-order/RemoveErrors.d.ts.map +1 -1
  348. package/dist/types/lists/extractors/2nd-order/RemoveExtends.d.ts.map +1 -1
  349. package/dist/types/lists/extractors/2nd-order/RemoveNever.d.ts.map +1 -1
  350. package/dist/types/lists/extractors/2nd-order/RemoveNotExtends.d.ts.map +1 -1
  351. package/dist/types/lists/extractors/2nd-order/RemoveStrings.d.ts.map +1 -1
  352. package/dist/types/lists/extractors/2nd-order/RetainEquals.d.ts.map +1 -1
  353. package/dist/types/lists/extractors/2nd-order/RetainExtends.d.ts.map +1 -1
  354. package/dist/types/lists/extractors/2nd-order/RetainNotExtends.d.ts.map +1 -1
  355. package/dist/types/lists/extractors/2nd-order/RetainStrings.d.ts.map +1 -1
  356. package/dist/types/lists/extractors/2nd-order/index.js +10 -10
  357. package/dist/types/lists/extractors/RemoveFromList.d.ts.map +1 -1
  358. package/dist/types/lists/extractors/RetainFromList.d.ts.map +1 -1
  359. package/dist/types/lists/extractors/index.js +4 -4
  360. package/dist/types/lists/index.d.ts +1 -0
  361. package/dist/types/lists/index.d.ts.map +1 -1
  362. package/dist/types/lists/index.js +33 -32
  363. package/dist/types/literals/Box.d.ts.map +1 -1
  364. package/dist/types/literals/Color.d.ts.map +1 -1
  365. package/dist/types/literals/ContainerBlockKey.d.ts.map +1 -1
  366. package/dist/types/literals/ContainerKeyGuarantee.d.ts.map +1 -1
  367. package/dist/types/literals/ExpandRecursively.d.ts.map +1 -1
  368. package/dist/types/literals/index.js +10 -10
  369. package/dist/types/numeric-literals/Abs.d.ts +2 -2
  370. package/dist/types/numeric-literals/Abs.d.ts.map +1 -1
  371. package/dist/types/numeric-literals/AbsMaybe.d.ts.map +1 -1
  372. package/dist/types/numeric-literals/Add.d.ts +77 -0
  373. package/dist/types/numeric-literals/Add.d.ts.map +1 -0
  374. package/dist/types/numeric-literals/Add.js +1 -0
  375. package/dist/types/numeric-literals/AsNumberWhenPossible.d.ts.map +1 -1
  376. package/dist/types/numeric-literals/Decrement.d.ts.map +1 -1
  377. package/dist/types/numeric-literals/Digit.d.ts.map +1 -1
  378. package/dist/types/numeric-literals/DigitNonZero.d.ts.map +1 -1
  379. package/dist/types/numeric-literals/Digitize.d.ts.map +1 -1
  380. package/dist/types/numeric-literals/Float.d.ts.map +1 -1
  381. package/dist/types/numeric-literals/Increment.d.ts.map +1 -1
  382. package/dist/types/numeric-literals/Negative.d.ts.map +1 -1
  383. package/dist/types/numeric-literals/NextDigit.d.ts.map +1 -1
  384. package/dist/types/numeric-literals/NumberLike.d.ts +8 -0
  385. package/dist/types/numeric-literals/NumberLike.d.ts.map +1 -0
  386. package/dist/types/numeric-literals/NumberLike.js +1 -0
  387. package/dist/types/numeric-literals/NumericRange.d.ts +1 -1
  388. package/dist/types/numeric-literals/NumericRange.d.ts.map +1 -1
  389. package/dist/types/numeric-literals/PriorDigit.d.ts.map +1 -1
  390. package/dist/types/numeric-literals/Subtract.d.ts +3 -1
  391. package/dist/types/numeric-literals/Subtract.d.ts.map +1 -1
  392. package/dist/types/numeric-literals/ToInteger.d.ts.map +1 -1
  393. package/dist/types/numeric-literals/index.d.ts +14 -11
  394. package/dist/types/numeric-literals/index.d.ts.map +1 -1
  395. package/dist/types/numeric-literals/index.js +23 -19
  396. package/dist/types/runtime-types/DescribeType.d.ts.map +1 -1
  397. package/dist/types/runtime-types/FromLiteralTokens.d.ts.map +1 -1
  398. package/dist/types/runtime-types/LiteralType.d.ts.map +1 -1
  399. package/dist/types/runtime-types/StringLiteralToken.d.ts.map +1 -1
  400. package/dist/types/runtime-types/TokenizeStringLiteral.d.ts.map +1 -1
  401. package/dist/types/runtime-types/Type.d.ts.map +1 -1
  402. package/dist/types/runtime-types/TypeOf.d.ts.map +1 -1
  403. package/dist/types/runtime-types/TypeToken.d.ts.map +1 -1
  404. package/dist/types/runtime-types/TypeTuple.d.ts.map +1 -1
  405. package/dist/types/runtime-types/api/boolean.d.ts.map +1 -1
  406. package/dist/types/runtime-types/api/number.d.ts.map +1 -1
  407. package/dist/types/runtime-types/api/string.d.ts.map +1 -1
  408. package/dist/types/runtime-types/api/stringLiteral.d.ts.map +1 -1
  409. package/dist/types/runtime-types/index.js +10 -10
  410. package/dist/types/sets/AllKeys.d.ts.map +1 -1
  411. package/dist/types/sets/Dedupe.d.ts.map +1 -1
  412. package/dist/types/sets/IntersectingKeys.d.ts.map +1 -1
  413. package/dist/types/sets/Intersection.d.ts.map +1 -1
  414. package/dist/types/sets/Relate.d.ts.map +1 -1
  415. package/dist/types/sets/SetCandidate.d.ts.map +1 -1
  416. package/dist/types/sets/SetRemoval.d.ts.map +1 -1
  417. package/dist/types/sets/Unique.d.ts +12 -1
  418. package/dist/types/sets/Unique.d.ts.map +1 -1
  419. package/dist/types/sets/UniqueKeys.d.ts.map +1 -1
  420. package/dist/types/sets/UniqueKeysUnion.d.ts.map +1 -1
  421. package/dist/types/sets/UniqueKv.d.ts.map +1 -1
  422. package/dist/types/sets/index.js +11 -11
  423. package/dist/types/string-literals/Cardinality.d.ts +2 -2
  424. package/dist/types/string-literals/Cardinality.d.ts.map +1 -1
  425. package/dist/types/string-literals/Chars.d.ts +2 -2
  426. package/dist/types/string-literals/Chars.d.ts.map +1 -1
  427. package/dist/types/string-literals/Concat.d.ts.map +1 -1
  428. package/dist/types/string-literals/Date.d.ts.map +1 -1
  429. package/dist/types/string-literals/DateTime.d.ts.map +1 -1
  430. package/dist/types/string-literals/DropChars.d.ts.map +1 -1
  431. package/dist/types/string-literals/EmptyStringOr.d.ts.map +1 -1
  432. package/dist/types/string-literals/EnsureLeading.d.ts.map +1 -1
  433. package/dist/types/string-literals/EnsureLeadingEvery.d.ts.map +1 -1
  434. package/dist/types/string-literals/EnsureTrailing.d.ts.map +1 -1
  435. package/dist/types/string-literals/FirstChar.d.ts.map +1 -1
  436. package/dist/types/string-literals/HasUppercase.d.ts.map +1 -1
  437. package/dist/types/string-literals/Join.d.ts.map +1 -1
  438. package/dist/types/string-literals/LastChar.d.ts.map +1 -1
  439. package/dist/types/string-literals/PathJoin.d.ts.map +1 -1
  440. package/dist/types/string-literals/Pluralize.d.ts.map +1 -1
  441. package/dist/types/string-literals/Prepend.d.ts.map +1 -1
  442. package/dist/types/string-literals/PrependAll.d.ts.map +1 -1
  443. package/dist/types/string-literals/RemainingChars.d.ts.map +1 -1
  444. package/dist/types/string-literals/Repeat.d.ts.map +1 -1
  445. package/dist/types/string-literals/RetainAfter.d.ts +7 -4
  446. package/dist/types/string-literals/RetainAfter.d.ts.map +1 -1
  447. package/dist/types/string-literals/Split.d.ts +10 -7
  448. package/dist/types/string-literals/Split.d.ts.map +1 -1
  449. package/dist/types/string-literals/StrLen.d.ts.map +1 -1
  450. package/dist/types/string-literals/StripAfter.d.ts +2 -2
  451. package/dist/types/string-literals/StripAfter.d.ts.map +1 -1
  452. package/dist/types/string-literals/StripBefore.d.ts +18 -0
  453. package/dist/types/string-literals/StripBefore.d.ts.map +1 -0
  454. package/dist/types/string-literals/StripBefore.js +1 -0
  455. package/dist/types/string-literals/StripLeading.d.ts.map +1 -1
  456. package/dist/types/string-literals/StripTrailing.d.ts.map +1 -1
  457. package/dist/types/string-literals/Suggest.d.ts.map +1 -1
  458. package/dist/types/string-literals/Time.d.ts.map +1 -1
  459. package/dist/types/string-literals/Truncate.d.ts.map +1 -1
  460. package/dist/types/string-literals/casing/AllCaps.d.ts +3 -3
  461. package/dist/types/string-literals/casing/AllCaps.d.ts.map +1 -1
  462. package/dist/types/string-literals/casing/CamelCase.d.ts.map +1 -1
  463. package/dist/types/string-literals/casing/CapFirstAlpha.d.ts.map +1 -1
  464. package/dist/types/string-literals/casing/DashUppercase.d.ts.map +1 -1
  465. package/dist/types/string-literals/casing/KebabCase.d.ts.map +1 -1
  466. package/dist/types/string-literals/casing/LowerAllCaps.d.ts.map +1 -1
  467. package/dist/types/string-literals/casing/PascalCase.d.ts.map +1 -1
  468. package/dist/types/string-literals/casing/RaiseAllLowercase.d.ts.map +1 -1
  469. package/dist/types/string-literals/casing/SnakeCase.d.ts.map +1 -1
  470. package/dist/types/string-literals/casing/index.js +12 -12
  471. package/dist/types/string-literals/character-sets/Alpha.d.ts.map +1 -1
  472. package/dist/types/string-literals/character-sets/AlphaChar.d.ts.map +1 -1
  473. package/dist/types/string-literals/character-sets/AlphaNumeric.d.ts.map +1 -1
  474. package/dist/types/string-literals/character-sets/CSV.d.ts.map +1 -1
  475. package/dist/types/string-literals/character-sets/Consonants.d.ts.map +1 -1
  476. package/dist/types/string-literals/character-sets/DomainName.d.ts.map +1 -1
  477. package/dist/types/string-literals/character-sets/DotPath.d.ts +1 -1
  478. package/dist/types/string-literals/character-sets/DotPath.d.ts.map +1 -1
  479. package/dist/types/string-literals/character-sets/DotPathFor.d.ts.map +1 -1
  480. package/dist/types/string-literals/character-sets/Hexadecimal.d.ts.map +1 -1
  481. package/dist/types/string-literals/character-sets/IpAddress.d.ts.map +1 -1
  482. package/dist/types/string-literals/character-sets/LowerAlpha.d.ts.map +1 -1
  483. package/dist/types/string-literals/character-sets/LowerAlphaChar.d.ts.map +1 -1
  484. package/dist/types/string-literals/character-sets/NonAlpha.d.ts.map +1 -1
  485. package/dist/types/string-literals/character-sets/NumericChar.d.ts.map +1 -1
  486. package/dist/types/string-literals/character-sets/SingularNoun.d.ts.map +1 -1
  487. package/dist/types/string-literals/character-sets/UpperAlphaChar.d.ts.map +1 -1
  488. package/dist/types/string-literals/character-sets/ValueAtDotPath.d.ts +1 -1
  489. package/dist/types/string-literals/character-sets/ValueAtDotPath.d.ts.map +1 -1
  490. package/dist/types/string-literals/character-sets/brackets/index.js +3 -3
  491. package/dist/types/string-literals/character-sets/index.js +26 -26
  492. package/dist/types/string-literals/character-sets/quotation-marks/index.js +6 -6
  493. package/dist/types/string-literals/index.d.ts +1 -2
  494. package/dist/types/string-literals/index.d.ts.map +1 -1
  495. package/dist/types/string-literals/index.js +36 -37
  496. package/dist/types/string-literals/options/index.js +2 -2
  497. package/dist/types/tsconfig.tsbuildinfo +1 -1
  498. package/dist/types/tuples/FirstKey.d.ts.map +1 -1
  499. package/dist/types/tuples/FirstKeyValue.d.ts +1 -1
  500. package/dist/types/tuples/FirstKeyValue.d.ts.map +1 -1
  501. package/dist/types/tuples/FromDictArray.d.ts.map +1 -1
  502. package/dist/types/tuples/LastOfEach.d.ts +14 -0
  503. package/dist/types/tuples/LastOfEach.d.ts.map +1 -0
  504. package/dist/types/tuples/LastOfEach.js +1 -0
  505. package/dist/types/tuples/index.js +7 -7
  506. package/dist/types/type-conversion/ArrConcat.d.ts.map +1 -1
  507. package/dist/types/type-conversion/AsBoolean.d.ts +7 -0
  508. package/dist/types/type-conversion/AsBoolean.d.ts.map +1 -0
  509. package/dist/types/type-conversion/AsBoolean.js +1 -0
  510. package/dist/types/type-conversion/AsFunction.d.ts.map +1 -1
  511. package/dist/types/type-conversion/AsNumber.d.ts +10 -3
  512. package/dist/types/type-conversion/AsNumber.d.ts.map +1 -1
  513. package/dist/types/type-conversion/AsPropertyKey.d.ts +13 -0
  514. package/dist/types/type-conversion/AsPropertyKey.d.ts.map +1 -0
  515. package/dist/types/type-conversion/AsPropertyKey.js +1 -0
  516. package/dist/types/type-conversion/AsString.d.ts +5 -1
  517. package/dist/types/type-conversion/AsString.d.ts.map +1 -1
  518. package/dist/types/type-conversion/IntersectWithAll.d.ts.map +1 -1
  519. package/dist/types/type-conversion/MergeObjects.d.ts +3 -6
  520. package/dist/types/type-conversion/MergeObjects.d.ts.map +1 -1
  521. package/dist/types/type-conversion/ObjValues.d.ts +10 -9
  522. package/dist/types/type-conversion/ObjValues.d.ts.map +1 -1
  523. package/dist/types/type-conversion/ObjectToKvDict.d.ts +7 -10
  524. package/dist/types/type-conversion/ObjectToKvDict.d.ts.map +1 -1
  525. package/dist/types/type-conversion/ReplaceAll.d.ts +1 -1
  526. package/dist/types/type-conversion/ReplaceAll.d.ts.map +1 -1
  527. package/dist/types/type-conversion/ReturnValues.d.ts.map +1 -1
  528. package/dist/types/type-conversion/ToBoolean.d.ts.map +1 -1
  529. package/dist/types/type-conversion/ToContainer.d.ts.map +1 -1
  530. package/dist/types/type-conversion/ToNumber.d.ts.map +1 -1
  531. package/dist/types/type-conversion/ToString.d.ts.map +1 -1
  532. package/dist/types/type-conversion/Trim.d.ts.map +1 -1
  533. package/dist/types/type-conversion/TrimLeft.d.ts.map +1 -1
  534. package/dist/types/type-conversion/TrimRight.d.ts.map +1 -1
  535. package/dist/types/type-conversion/TupleToUnion.d.ts.map +1 -1
  536. package/dist/types/type-conversion/UnionToTuple.d.ts +10 -6
  537. package/dist/types/type-conversion/UnionToTuple.d.ts.map +1 -1
  538. package/dist/types/type-conversion/UnionToTuple.js +0 -1
  539. package/dist/types/type-conversion/ValueOrReturnValue.d.ts.map +1 -1
  540. package/dist/types/type-conversion/Widen.d.ts.map +1 -1
  541. package/dist/types/type-conversion/WidenProps.d.ts.map +1 -1
  542. package/dist/types/type-conversion/WithDefault.d.ts.map +1 -1
  543. package/dist/types/type-conversion/form-fields.d.ts.map +1 -1
  544. package/dist/types/type-conversion/index.d.ts +2 -0
  545. package/dist/types/type-conversion/index.d.ts.map +1 -1
  546. package/dist/types/type-conversion/index.js +40 -38
  547. package/package.json +6 -5
  548. package/dist/runtime/dictionary/strArrayToDict.d.ts +0 -7
  549. package/dist/runtime/dictionary/strArrayToDict.d.ts.map +0 -1
  550. package/dist/runtime/dictionary/strArrayToDict.js +0 -10
  551. package/dist/runtime/dictionary/withValue.d.ts +0 -26
  552. package/dist/runtime/dictionary/withValue.d.ts.map +0 -1
  553. package/dist/runtime/dictionary/withValue.js +0 -21
  554. package/dist/runtime/runtime-types/extractTypeToken.d.ts +0 -2
  555. package/dist/runtime/runtime-types/extractTypeToken.d.ts.map +0 -1
  556. package/dist/runtime/runtime-types/extractTypeToken.js +0 -11
  557. package/dist/runtime/type-guards/isSameType.d.ts +0 -10
  558. package/dist/runtime/type-guards/isSameType.d.ts.map +0 -1
  559. package/dist/runtime/type-guards/isSameType.js +0 -64
  560. package/dist/types/boolean-logic/combinators/FirstIdx.d.ts +0 -11
  561. package/dist/types/boolean-logic/combinators/FirstIdx.d.ts.map +0 -1
  562. package/dist/types/boolean-logic/narrowing/AsPropertyKey.d.ts +0 -21
  563. package/dist/types/boolean-logic/narrowing/AsPropertyKey.d.ts.map +0 -1
  564. package/dist/types/string-literals/CaseInsensitive.d.ts +0 -30
  565. package/dist/types/string-literals/CaseInsensitive.d.ts.map +0 -1
  566. package/dist/types/string-literals/Interpolate.d.ts +0 -15
  567. package/dist/types/string-literals/Interpolate.d.ts.map +0 -1
  568. /package/dist/types/boolean-logic/{combinators/FirstIdx.js → branching/IfLessThan.js} +0 -0
  569. /package/dist/types/boolean-logic/{narrowing/AsPropertyKey.js → branching/IfNegativeNumber.js} +0 -0
  570. /package/dist/types/{string-literals/CaseInsensitive.js → boolean-logic/branching/IfNotTuple.js} +0 -0
  571. /package/dist/types/{string-literals/Interpolate.js → boolean-logic/branching/IfPositive.js} +0 -0
@@ -1,10 +0,0 @@
1
- /**
2
- * converts an array of strings `["a", "b", "c"]` into a more type friendly
3
- * dictionary of the type `{ a: true, b: true, c: true }`
4
- */
5
- export function strArrayToDict(...strings) {
6
- return strings.reduce((acc, str) => {
7
- acc = { ...acc, [str]: true };
8
- return acc;
9
- }, {});
10
- }
@@ -1,26 +0,0 @@
1
- import { AnyObject, Narrowable, WithValue } from "../../types";
2
- import { KindApi } from "..";
3
- /**
4
- * **WithValuePartial**`<TReturn>`
5
- *
6
- * A runtime utility function which receives an object of some structure
7
- * and then reduces this to only key/value pairs where the _values_ extend
8
- * the `TReturn` type.
9
- */
10
- export type WithValuePartial<TReturn> = <TObj extends AnyObject>(obj: TObj) => WithValue<TObj, TReturn>;
11
- /**
12
- * **withValue**
13
- *
14
- * Reduces a dictionary object -- in both _type_ and _run-time_ structure -- to only those
15
- * key/value pairs which _do not have_ a specified value. For instance:
16
- *
17
- * ```ts
18
- * const obj = { foo: 1, bar: 2, message: "hi there" };
19
- * // { message: "hi there" }
20
- * const onlyStrings = withoutValue(t => t.string())(obj);
21
- * // { foo: 1 }
22
- * const justOne = withoutValue(t => t.literal(1))(obj);
23
- * ```
24
- */
25
- export declare const withValue: <N extends Narrowable, TApi extends (t: KindApi) => N>(cb: TApi) => <TObj extends AnyObject>(obj: TObj) => WithValue<TObj, ReturnType<TApi>>;
26
- //# sourceMappingURL=withValue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"withValue.d.ts","sourceRoot":"","sources":["../../../src/runtime/dictionary/withValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,oBAAkB;AAC9D,OAAO,EAAE,OAAO,EAAoB,WAAoB;AAExD;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,CAAC,OAAO,IAAI,CACtC,IAAI,SAAS,SAAS,EACtB,GAAG,EAAE,IAAI,KAAK,SAAS,CAAC,IAAI,EAAC,OAAO,CAAC,CAAC;AAExC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,SAAS,0CAEH,OAAO,6FAYvB,CAAC"}
@@ -1,21 +0,0 @@
1
- import { kind, isSameType } from "..";
2
- /**
3
- * **withValue**
4
- *
5
- * Reduces a dictionary object -- in both _type_ and _run-time_ structure -- to only those
6
- * key/value pairs which _do not have_ a specified value. For instance:
7
- *
8
- * ```ts
9
- * const obj = { foo: 1, bar: 2, message: "hi there" };
10
- * // { message: "hi there" }
11
- * const onlyStrings = withoutValue(t => t.string())(obj);
12
- * // { foo: 1 }
13
- * const justOne = withoutValue(t => t.literal(1))(obj);
14
- * ```
15
- */
16
- export const withValue = (cb) => (obj) => {
17
- const newObj = Object.keys(obj).reduce((acc, key) => key in obj && isSameType(obj[key], cb(kind))
18
- ? ({ ...acc, [key]: obj[key] })
19
- : acc, {});
20
- return newObj;
21
- };
@@ -1,2 +0,0 @@
1
- export declare function extractTypeToken<T>(tuple: T): (string | undefined)[];
2
- //# sourceMappingURL=extractTypeToken.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"extractTypeToken.d.ts","sourceRoot":"","sources":["../../../src/runtime/runtime-types/extractTypeToken.ts"],"names":[],"mappings":"AAMA,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,0BAU3C"}
@@ -1,11 +0,0 @@
1
- import { isTypeToken, stripLeading, stripTrailing } from "..";
2
- export function extractTypeToken(tuple) {
3
- if (isTypeToken(tuple)) {
4
- const [name, defn] = stripTrailing(stripLeading(tuple, "<<"), ">>").split(":");
5
- // const type = tuple as TypeToken<typeof name>;
6
- return [name, defn];
7
- }
8
- else {
9
- throw new Error(`The string passed into extractTypeToken() was NOT a TypeToken type! The string was: ${tuple}`);
10
- }
11
- }
@@ -1,10 +0,0 @@
1
- import { Narrowable } from "../../types";
2
- /**
3
- * **isSameType**(value, comparison)
4
- *
5
- * Type guard which takes a value and then compares it to another to determine
6
- * if the two types are the same. The _comparison_ type can be an actual variable
7
- * with a type but it can also be a `TypeToken` representing a type.
8
- */
9
- export declare function isSameType<TVal, TComparison extends Narrowable>(value: TVal, comparison: TComparison): value is TVal & TComparison;
10
- //# sourceMappingURL=isSameType.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isSameType.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/isSameType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,oBAAkB;AAIvC;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,IAAI,EACJ,WAAW,SAAS,UAAU,EAC9B,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,GAAG,KAAK,IAAI,IAAI,GAAG,WAAW,CAyDnE"}
@@ -1,64 +0,0 @@
1
- import { isBoolean, isNull, isNumber, isNumericString, isString, isTypeToken, isUndefined, extractTypeToken, toCamelCase, toPascalCase, toKebabCase, toSnakeCase, isSameTypeOf, endsWith, startsWith, isObject } from "..";
2
- /**
3
- * **isSameType**(value, comparison)
4
- *
5
- * Type guard which takes a value and then compares it to another to determine
6
- * if the two types are the same. The _comparison_ type can be an actual variable
7
- * with a type but it can also be a `TypeToken` representing a type.
8
- */
9
- export function isSameType(value, comparison) {
10
- if (isTypeToken(comparison)) {
11
- // compare value to type represented by a TypeToken
12
- const [token, data] = extractTypeToken(comparison);
13
- switch (token) {
14
- case "string":
15
- return isString(value) ? true : false;
16
- case "number":
17
- return isNumber(value) ? true : false;
18
- case "boolean":
19
- return isBoolean(value) ? true : false;
20
- case "undefined":
21
- return isUndefined(value) ? true : false;
22
- case "null":
23
- return isNull(value) ? true : false;
24
- case "false":
25
- return value === false ? true : false;
26
- case "true":
27
- return value === true ? true : false;
28
- case "numericString":
29
- return isNumericString(value) ? true : false;
30
- case "booleanString":
31
- return isString(value) && ["true", "false"].includes(value);
32
- case "space":
33
- return value === " " ? true : false;
34
- case "object":
35
- return isObject(value) ? true : false;
36
- // case "whitespace":
37
- // return isWhitespace(value) ? true : false;
38
- case "stringLiteral":
39
- return isString(value) && value === data ? true : false;
40
- case "numericLiteral":
41
- return isNumber(value) && value === Number(data) ? true : false;
42
- case "camelCase":
43
- return isString(value) && value === toCamelCase(value) ? true : false;
44
- case "pascalCase":
45
- return isString(value) && value === toPascalCase(value) ? true : false;
46
- case "kebabCase":
47
- return isString(value) && value === toKebabCase(value) ? true : false;
48
- case "snakeCase":
49
- return isString(value) && value === toSnakeCase(value) ? true : false;
50
- case "endsWith":
51
- return isString(value) && isString(data) && endsWith(data)(value) ? true : false;
52
- case "startsWith":
53
- return isString(value) && isString(data) && startsWith(data)(value) ? true : false;
54
- default:
55
- throw new Error(`No implementation for ${token} yet!`);
56
- }
57
- }
58
- else {
59
- // compare the types of two runtime values; in this scenario
60
- // we only can test for "extends" relationship at best because
61
- // we only have the runtime system to work with
62
- return isSameTypeOf(value)(comparison);
63
- }
64
- }
@@ -1,11 +0,0 @@
1
- import { Tuple } from "../../index";
2
- export type FirstAsOperations = "truthy" | "falsy" | "null" | "undefined" | "object" | "EmptyObject" | readonly unknown[];
3
- /**
4
- * **FirstIdx**`<TTypes,TFind> → numeric-literal`
5
- *
6
- * Provides a numeric index of where the first occurrence was found
7
- * of the given "set". You can use the built-in sets or add a `Tuple`
8
- * as the operational set
9
- */
10
- export type FirstIdx<TTypes extends Tuple, TFind extends FirstAsOperations> = any;
11
- //# sourceMappingURL=FirstIdx.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FirstIdx.d.ts","sourceRoot":"","sources":["../../../../src/types/boolean-logic/combinators/FirstIdx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,oBAAwB;AAExC,MAAM,MAAM,iBAAiB,GAC3B,QAAQ,GACR,OAAO,GACP,MAAM,GACN,WAAW,GACX,QAAQ,GACR,aAAa,GACb,SAAS,OAAO,EAAE,CAAC;AAErB;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,CAClB,MAAM,SAAS,KAAK,EACpB,KAAK,SAAS,iBAAiB,IAC7B,GAAG,CAAC"}
@@ -1,21 +0,0 @@
1
- import { AnyObject, Concat, Container, Filter, IfEqual, IfNever, Increment, Keys, Tuple } from "../../index";
2
- type HowMany<T extends AnyObject> = Filter<Keys<T>, `ERR_${string}`, "extends"> extends Tuple ? Filter<Keys<T>, `ERR_${string}`, "extends">["length"] extends number ? Increment<Filter<Keys<T>, `ERR_${string}`, "extends">["length"]> : never : never;
3
- type NextError<T extends AnyObject> = HowMany<T> extends number ? IfNever<Concat<["ERR_", HowMany<T>]>, "ERR", Concat<["ERR_", HowMany<T>]>> : never;
4
- /**
5
- * **AsPropertyKey**`<T,[C]>`
6
- *
7
- * Proxies `T` through as a `PropertyKey` when it is one, when it is not
8
- * it converts it into one anyway but with a key name that is immediately
9
- * identifiable.
10
- *
11
- * #### Error Keying
12
- * If `T` is not a `PropertyKey` then:
13
- * - it will use the key `ERR` if no actual container is passed into `C`
14
- * - if `C` is available then keying will be done based on the container type:
15
- * - **Object** - if the container is an object then it will use `ERR_1`
16
- * or increment the counter as many times as it need not to override an existing key
17
- * - **Array** - the index will be converted to -1; subsequent calls will continue to use this index.
18
- */
19
- export type AsPropertyKey<T, C extends Container = Container> = T extends PropertyKey ? T : IfEqual<C, Container, "ERR", C extends AnyObject ? NextError<C> : -1>;
20
- export {};
21
- //# sourceMappingURL=AsPropertyKey.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AsPropertyKey.d.ts","sourceRoot":"","sources":["../../../../src/types/boolean-logic/narrowing/AsPropertyKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,oBAAwB;AAEjH,KAAK,OAAO,CAAC,CAAC,SAAS,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,MAAM,EAAE,EAAE,SAAS,CAAC,SAAS,KAAK,GAC3F,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,MAAM,EAAE,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,SAAS,MAAM,GAClE,SAAS,CACP,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,MAAM,EAAE,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,CACtD,GACD,KAAK,GACR,KAAK,CAAC;AAGP,KAAK,SAAS,CAAC,CAAC,SAAS,SAAS,IAAI,OAAO,CAAC,CAAC,CAAC,SAAS,MAAM,GAC7D,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAC1E,KAAK,CAAC;AAER;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,GAAG,SAAS,IAAI,CAAC,SAAS,WAAW,GACnF,CAAC,GACD,OAAO,CACL,CAAC,EAAE,SAAS,EACZ,KAAK,EACL,CAAC,SAAS,SAAS,GACjB,SAAS,CAAC,CAAC,CAAC,GACZ,CAAC,CAAC,CACL,CAAC"}
@@ -1,30 +0,0 @@
1
- import { AfterFirst, AsArray, AsString, First, FirstChar, Join, LowerAlphaChar, RemainingChars, Split, Tuple, UpperAlphaChar } from "..";
2
- /**
3
- * Make the first character of the string case insensitive which
4
- * results in a union type if the first character is alphabetic
5
- * but remains unchanged if not.
6
- */
7
- type Insensitive<T extends string> = FirstChar<T> extends UpperAlphaChar ? `${FirstChar<T>}${RemainingChars<T>}` | `${Lowercase<FirstChar<T>>}${RemainingChars<T>}` : FirstChar<T> extends LowerAlphaChar ? FirstChar<T> | Uppercase<FirstChar<T>> : FirstChar<T>;
8
- /**
9
- * Process each of the string blocks where each
10
- * block is typically started with an uppercase
11
- * character
12
- */
13
- type ProcessBlock<TBlock extends Tuple<string>, TResult extends Tuple = []> = [] extends TBlock ? TResult : ProcessBlock<AfterFirst<TBlock>, [
14
- ...TResult,
15
- Insensitive<First<TBlock>>
16
- ]>;
17
- type ProcessElement<TContent extends string> = Join<ProcessBlock<Split<Capitalize<AsString<TContent>>, UpperAlphaChar, "retain"> extends readonly string[] ? Split<Capitalize<AsString<TContent>>, UpperAlphaChar, "retain"> : never>>;
18
- type ProcessEach<TContent extends readonly string[]> = {
19
- [K in keyof TContent]: ProcessElement<TContent[K]>;
20
- };
21
- /**
22
- * **CaseInsensitive**
23
- *
24
- * Receives a string literal (or a Tuple of string literals) and then returns a union
25
- * type which allows all capital letters to be _upper_ or _lower_ case (as well as
26
- * the very first character).
27
- */
28
- export type CaseInsensitive<TContent extends string | readonly string[]> = TContent extends readonly string[] ? ProcessEach<AsArray<TContent>> : ProcessElement<AsString<TContent>>;
29
- export {};
30
- //# sourceMappingURL=CaseInsensitive.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CaseInsensitive.d.ts","sourceRoot":"","sources":["../../../src/types/string-literals/CaseInsensitive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,OAAO,EACP,QAAQ,EACR,KAAK,EACL,SAAS,EACT,IAAI,EACJ,cAAc,EACd,cAAc,EACd,KAAK,EACL,KAAK,EACL,cAAc,EACf,MAAM,IAAI,CAAC;AAEZ;;;;GAIG;AACH,KAAK,WAAW,CAAC,CAAC,SAAS,MAAM,IACjC,SAAS,CAAC,CAAC,CAAC,SAAS,cAAc,GAC/B,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,EAAE,GAAG,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,EAAE,GACxF,SAAS,CAAC,CAAC,CAAC,SAAS,cAAc,GACjC,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GACtC,SAAS,CAAC,CAAC,CAAC,CAAC;AAEnB;;;;GAIG;AACH,KAAK,YAAY,CACf,MAAM,SAAS,KAAK,CAAC,MAAM,CAAC,EAC5B,OAAO,SAAS,KAAK,GAAG,EAAE,IACxB,EAAE,SAAS,MAAM,GACjB,OAAO,GACP,YAAY,CACV,UAAU,CAAC,MAAM,CAAC,EAClB;IAAC,GAAG,OAAO;IAAE,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;CAAC,CACzC,CAAC;AAEN,KAAK,cAAc,CACjB,QAAQ,SAAS,MAAM,IACrB,IAAI,CAAC,YAAY,CACnB,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,EAAE,cAAc,EAAE,QAAQ,CAAC,SAAS,SAAS,MAAM,EAAE,GACrF,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,EAAE,cAAc,EAAE,QAAQ,CAAC,GAC/D,KAAK,CACV,CAAC,CAAC;AAEH,KAAK,WAAW,CAChB,QAAQ,SAAS,SAAS,MAAM,EAAE,IAC9B;KACD,CAAC,IAAI,MAAM,QAAQ,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;CACnD,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,CACzB,QAAQ,SAAS,MAAM,GAAG,SAAS,MAAM,EAAE,IACzC,QAAQ,SAAS,SAAS,MAAM,EAAE,GACpC,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,GAC9B,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC"}
@@ -1,15 +0,0 @@
1
- import { AfterFirst, AnyObject, Container, First, IfObjectLiteral, IfStringLiteral, Keys, ReplaceAll, ToString, WithDefault } from "..";
2
- type Left<T extends readonly [string, string]> = T[0];
3
- type Right<T extends readonly [string, string]> = T[1];
4
- type IterateKeys<TText extends string, TContainer extends Container, TDelimiters extends readonly [string, string], TKeys extends readonly PropertyKey[]> = [] extends TKeys ? TText : IterateKeys<First<TKeys> extends keyof TContainer ? ReplaceAll<TText, `${Left<TDelimiters>}${ToString<First<TKeys>>}${Right<TDelimiters>}`, ToString<TContainer[First<TKeys>]>> : TText, TContainer, TDelimiters, AfterFirst<TKeys>>;
5
- type InterpolateTuple<TText extends string, TTuple extends readonly unknown[], TDelimiters extends readonly [string, string]> = TText extends `${string}${Left<TDelimiters>}${number}${Right<TDelimiters>}${string}` ? IterateKeys<TText, TTuple, TDelimiters, Keys<TTuple>> : TText;
6
- type InterpolateObject<TText extends string, TObj extends AnyObject, TDelimiters extends readonly [string, string]> = IfObjectLiteral<TObj, IfStringLiteral<TText, TText extends `${string}${Left<TDelimiters>}${string}${Right<TDelimiters>}${string}` ? IterateKeys<TText, TObj, TDelimiters, Keys<TObj>> : TText, string>, string>;
7
- export type Interpolate<TText extends string, TContainer extends Container, TDelimiters extends readonly [string, string] = ["", ""]> = TContainer extends readonly unknown[] ? InterpolateTuple<TText, TContainer, [
8
- WithDefault<TDelimiters[0], "[[", "falsy">,
9
- WithDefault<TDelimiters[1], "]]", "falsy">
10
- ]> : TContainer extends AnyObject ? InterpolateObject<TText, TContainer, [
11
- WithDefault<TDelimiters[0], "{{", "falsy">,
12
- WithDefault<TDelimiters[1], "}}", "falsy">
13
- ]> : never;
14
- export {};
15
- //# sourceMappingURL=Interpolate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Interpolate.d.ts","sourceRoot":"","sources":["../../../src/types/string-literals/Interpolate.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EACT,SAAS,EACT,KAAK,EACL,eAAe,EACf,eAAe,EACf,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,WAAW,EACZ,MAAM,IAAI,CAAC;AAEZ,KAAK,IAAI,CAAC,CAAC,SAAS,SAAS,CAAE,MAAM,EAAE,MAAM,CAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACxD,KAAK,KAAK,CAAC,CAAC,SAAS,SAAS,CAAE,MAAM,EAAE,MAAM,CAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAEzD,KAAK,WAAW,CACd,KAAK,SAAS,MAAM,EACpB,UAAU,SAAS,SAAS,EAC5B,WAAW,SAAS,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7C,KAAK,SAAS,SAAS,WAAW,EAAE,IAClC,EAAE,SAAS,KAAK,GAClB,KAAK,GACL,WAAW,CACT,KAAK,CAAC,KAAK,CAAC,SAAS,MAAM,UAAU,GACjC,UAAU,CACR,KAAK,EACL,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC,EAAE,EAAE,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CACzG,GACD,KAAK,EACT,UAAU,EACV,WAAW,EACX,UAAU,CAAC,KAAK,CAAC,CAClB,CAAC;AAEJ,KAAK,gBAAgB,CACnB,KAAK,SAAS,MAAM,EACpB,MAAM,SAAS,SAAS,OAAO,EAAE,EACjC,WAAW,SAAS,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,IAC3C,KAAK,SAAS,GAAG,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,MAAM,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,MAAM,EAAE,GACtF,WAAW,CAAC,KAAK,EAAC,MAAM,EAAC,WAAW,EAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAClD,KAAK,CAAC;AAER,KAAK,iBAAiB,CACpB,KAAK,SAAS,MAAM,EACpB,IAAI,SAAS,SAAS,EACtB,WAAW,SAAS,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,IAC3C,eAAe,CACjB,IAAI,EACJ,eAAe,CACb,KAAK,EACL,KAAK,SAAS,GAAG,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,MAAM,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,MAAM,EAAE,GAChF,WAAW,CAAC,KAAK,EAAC,IAAI,EAAC,WAAW,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAC9C,KAAK,EACP,MAAM,CACP,EACH,MAAM,CACP,CAAC;AAEF,MAAM,MAAM,WAAW,CACrB,KAAK,SAAS,MAAM,EACpB,UAAU,SAAS,SAAS,EAC5B,WAAW,SAAS,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE,EAAC,EAAE,CAAC,IACrD,UAAU,SAAS,SAAS,OAAO,EAAE,GACvC,gBAAgB,CACd,KAAK,EACL,UAAU,EACV;IACE,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC;IAC1C,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC;CAC3C,CACF,GACD,UAAU,SAAS,SAAS,GAC1B,iBAAiB,CACf,KAAK,EACL,UAAU,EACV;IACE,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC;IAC1C,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC;CAC3C,CACF,GACD,KAAK,CAAC"}