@clipboard-health/util-ts 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.3.1](https://github.com/ClipboardHealth/cbh-core/compare/util-ts-0.3.0...util-ts-0.3.1) (2023-04-24)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * export types ([565f3a1](https://github.com/ClipboardHealth/cbh-core/commit/565f3a175c96836719a23c5597abec54eeb07362))
11
+
12
+ ## [0.3.0](https://github.com/ClipboardHealth/cbh-core/compare/util-ts-0.2.0...util-ts-0.3.0) (2023-04-24)
13
+
14
+
15
+ ### Features
16
+
17
+ * use XO ESLint config ([#26](https://github.com/ClipboardHealth/cbh-core/issues/26) ([ae385eb](https://github.com/ClipboardHealth/cbh-core/commit/ae385eb06d02a79f894e2f229731f2cf0aedffbd))
18
+
5
19
  ## [0.2.0](https://github.com/ClipboardHealth/cbh-core/compare/util-ts-0.1.0...util-ts-0.2.0) (2023-04-24)
6
20
 
7
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clipboard-health/util-ts",
3
- "version": "0.2.0",
3
+ "version": "0.3.1",
4
4
  "main": "./src/index.js",
5
5
  "scripts": {
6
6
  "build": "nx build util-ts",
package/src/index.d.ts CHANGED
@@ -2,5 +2,5 @@ export * from "./lib/cbh-error";
2
2
  export * from "./lib/cbh-response";
3
3
  export * from "./lib/force-cast";
4
4
  export * from "./lib/is-null-or-undefined";
5
- export * from "./lib/types.d";
5
+ export * from "./lib/types";
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/util-ts/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/util-ts/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,aAAa,CAAC"}
package/src/index.js CHANGED
@@ -5,5 +5,5 @@ tslib_1.__exportStar(require("./lib/cbh-error"), exports);
5
5
  tslib_1.__exportStar(require("./lib/cbh-response"), exports);
6
6
  tslib_1.__exportStar(require("./lib/force-cast"), exports);
7
7
  tslib_1.__exportStar(require("./lib/is-null-or-undefined"), exports);
8
- tslib_1.__exportStar(require("./lib/types.d"), exports);
8
+ tslib_1.__exportStar(require("./lib/types"), exports);
9
9
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/util-ts/src/index.ts"],"names":[],"mappings":";;;AAAA,0DAAgC;AAChC,6DAAmC;AACnC,2DAAiC;AACjC,qEAA2C;AAC3C,wDAA8B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/util-ts/src/index.ts"],"names":[],"mappings":";;;AAAA,0DAAgC;AAChC,6DAAmC;AACnC,2DAAiC;AACjC,qEAA2C;AAC3C,sDAA4B"}
@@ -7,7 +7,7 @@ class CbhError extends Error {
7
7
  const is = toNonEmptyArray(issues);
8
8
  const first = is[0];
9
9
  super(first?.message, { cause: first?.cause });
10
- // see https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html#example
10
+ // See https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html#example
11
11
  Object.setPrototypeOf(this, new.target.prototype);
12
12
  this.issues = is;
13
13
  this.name = "CbhError";
@@ -1,4 +1,4 @@
1
- import { CbhError, CbhIssue } from "./cbh-error";
1
+ import { CbhError, type CbhIssue } from "./cbh-error";
2
2
  import type { OneOrNonEmptyArray } from "./types";
3
3
  export type CbhResponse<T> = {
4
4
  success: true;
@@ -1 +1 @@
1
- {"version":3,"file":"cbh-response.d.ts","sourceRoot":"","sources":["../../../../../packages/util-ts/src/lib/cbh-response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,MAAM,MAAM,WAAW,CAAC,CAAC,IACrB;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,GAC1B;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,QAAQ,CAAA;CAAE,CAAC;AAExC,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,kBAAkB,CAAC,QAAQ,CAAC,GAAG;IACxE,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE,QAAQ,CAAC;CACjB,CAEA;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,CAE3E"}
1
+ {"version":3,"file":"cbh-response.d.ts","sourceRoot":"","sources":["../../../../../packages/util-ts/src/lib/cbh-response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,MAAM,MAAM,WAAW,CAAC,CAAC,IACrB;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,GAC1B;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,QAAQ,CAAA;CAAE,CAAC;AAExC,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,kBAAkB,CAAC,QAAQ,CAAC,GAAG;IACxE,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE,QAAQ,CAAC;CACjB,CAEA;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,CAE3E"}
@@ -1 +1 @@
1
- {"version":3,"file":"cbh-response.js","sourceRoot":"","sources":["../../../../../packages/util-ts/src/lib/cbh-response.ts"],"names":[],"mappings":";;;AAAA,2CAAiD;AAOjD,SAAgB,kBAAkB,CAAC,MAAoC;IAIrE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,oBAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;AACzD,CAAC;AALD,gDAKC;AAED,SAAgB,oBAAoB,CAAI,IAAO;IAC7C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AACjC,CAAC;AAFD,oDAEC"}
1
+ {"version":3,"file":"cbh-response.js","sourceRoot":"","sources":["../../../../../packages/util-ts/src/lib/cbh-response.ts"],"names":[],"mappings":";;;AAAA,2CAAsD;AAOtD,SAAgB,kBAAkB,CAAC,MAAoC;IAIrE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,oBAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;AACzD,CAAC;AALD,gDAKC;AAED,SAAgB,oBAAoB,CAAI,IAAO;IAC7C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AACjC,CAAC;AAFD,oDAEC"}
@@ -1 +1 @@
1
- {"version":3,"file":"force-cast.d.ts","sourceRoot":"","sources":["../../../../../packages/util-ts/src/lib/force-cast.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,GAAG,CAAC,CAG5C"}
1
+ {"version":3,"file":"force-cast.d.ts","sourceRoot":"","sources":["../../../../../packages/util-ts/src/lib/force-cast.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,GAAG,CAAC,CAE5C"}
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.forceCast = void 0;
4
4
  /** Force cast to the provided type. */
5
5
  function forceCast(val) {
6
- // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
7
6
  return val;
8
7
  }
9
8
  exports.forceCast = forceCast;
@@ -1 +1 @@
1
- {"version":3,"file":"force-cast.js","sourceRoot":"","sources":["../../../../../packages/util-ts/src/lib/force-cast.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,SAAgB,SAAS,CAAI,GAAY;IACvC,yEAAyE;IACzE,OAAO,GAAQ,CAAC;AAClB,CAAC;AAHD,8BAGC"}
1
+ {"version":3,"file":"force-cast.js","sourceRoot":"","sources":["../../../../../packages/util-ts/src/lib/force-cast.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,SAAgB,SAAS,CAAI,GAAY;IACvC,OAAO,GAAQ,CAAC;AAClB,CAAC;AAFD,8BAEC"}
@@ -1 +1 @@
1
- {"version":3,"file":"is-null-or-undefined.d.ts","sourceRoot":"","sources":["../../../../../packages/util-ts/src/lib/is-null-or-undefined.ts"],"names":[],"mappings":"AAAA,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,IAAI,GAAG,SAAS,CAEvE"}
1
+ {"version":3,"file":"is-null-or-undefined.d.ts","sourceRoot":"","sources":["../../../../../packages/util-ts/src/lib/is-null-or-undefined.ts"],"names":[],"mappings":"AACA,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,IAAI,GAAG,SAAS,CAEvE"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isNullOrUndefined = void 0;
4
+ // eslint-disable-next-line @typescript-eslint/ban-types
4
5
  function isNullOrUndefined(val) {
5
6
  return val === null || val === undefined;
6
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"is-null-or-undefined.js","sourceRoot":"","sources":["../../../../../packages/util-ts/src/lib/is-null-or-undefined.ts"],"names":[],"mappings":";;;AAAA,SAAgB,iBAAiB,CAAC,GAAY;IAC5C,OAAO,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,CAAC;AAC3C,CAAC;AAFD,8CAEC"}
1
+ {"version":3,"file":"is-null-or-undefined.js","sourceRoot":"","sources":["../../../../../packages/util-ts/src/lib/is-null-or-undefined.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AACxD,SAAgB,iBAAiB,CAAC,GAAY;IAC5C,OAAO,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,CAAC;AAC3C,CAAC;AAFD,8CAEC"}
@@ -0,0 +1,3 @@
1
+ export type NonEmptyArray<T> = [T, ...T[]];
2
+ export type OneOrNonEmptyArray<T> = T | NonEmptyArray<T>;
3
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../packages/util-ts/src/lib/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;AAE3C,MAAM,MAAM,kBAAkB,CAAC,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../packages/util-ts/src/lib/types.ts"],"names":[],"mappings":""}