@naturalcycles/js-lib 15.1.0 → 15.2.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.
@@ -264,6 +264,9 @@ export class AppError extends Error {
264
264
  enumerable: true, // unlike standard - setting it to true for "visibility"
265
265
  });
266
266
  }
267
+ else {
268
+ delete this.cause; // otherwise it's printed as `cause: undefined`
269
+ }
267
270
  // this is to allow changing this.constuctor.name to a non-minified version
268
271
  Object.defineProperty(this.constructor, 'name', {
269
272
  value: name,
package/dist/types.d.ts CHANGED
@@ -233,6 +233,12 @@ export type PositiveInteger = number;
233
233
  export type NonNegativeInteger = number;
234
234
  export type PositiveNumber = number;
235
235
  export type NonNegativeNumber = number;
236
+ /**
237
+ * Same as `number`, but with semantic meaning that it's a Float.
238
+ */
239
+ export type Float = number;
240
+ export type PositiveFloat = number;
241
+ export type NonNegativeFloat = number;
236
242
  /**
237
243
  * Convenience type alias, that allows to write this:
238
244
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/js-lib",
3
3
  "type": "module",
4
- "version": "15.1.0",
4
+ "version": "15.2.0",
5
5
  "dependencies": {
6
6
  "tslib": "^2",
7
7
  "zod": "^3"
@@ -351,6 +351,8 @@ export class AppError<DATA_TYPE extends ErrorData = ErrorData> extends Error {
351
351
  configurable: true,
352
352
  enumerable: true, // unlike standard - setting it to true for "visibility"
353
353
  })
354
+ } else {
355
+ delete this.cause // otherwise it's printed as `cause: undefined`
354
356
  }
355
357
 
356
358
  // this is to allow changing this.constuctor.name to a non-minified version
package/src/types.ts CHANGED
@@ -297,6 +297,13 @@ export type NonNegativeInteger = number
297
297
  export type PositiveNumber = number
298
298
  export type NonNegativeNumber = number
299
299
 
300
+ /**
301
+ * Same as `number`, but with semantic meaning that it's a Float.
302
+ */
303
+ export type Float = number
304
+ export type PositiveFloat = number
305
+ export type NonNegativeFloat = number
306
+
300
307
  /**
301
308
  * Convenience type alias, that allows to write this:
302
309
  *