ts-gems 2.2.0 → 2.2.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.
Files changed (2) hide show
  1. package/lib/common.d.ts +6 -1
  2. package/package.json +7 -9
package/lib/common.d.ts CHANGED
@@ -93,6 +93,11 @@ type NoUnion<T, U = T> = T extends U ? [U] extends [T] ? T : never : never;
93
93
  * Opaque
94
94
  * @desc Create unique type that can't be assigned to base type by accident.
95
95
  */
96
+ declare namespace Symbols {
97
+ export const base: unique symbol;
98
+ export const brand: unique symbol;
99
+ }
96
100
  type Opaque<T, N extends string> = T & {
97
- __type: N;
101
+ readonly [Symbols.base]: N;
102
+ readonly [Symbols.brand]: N;
98
103
  }
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "lodash",
13
13
  "underscore"
14
14
  ],
15
- "version": "2.2.0",
15
+ "version": "2.2.1",
16
16
  "types": "lib/index.d.ts",
17
17
  "repository": "git@github.com:panates/ts-gems.git",
18
18
  "author": "Eray Hanoglu <e.hanoglu@panates.com>",
@@ -29,14 +29,12 @@
29
29
  "README",
30
30
  "lib/"
31
31
  ],
32
- "peerDependencies": {
33
- "typescript": ">=4.0.0"
34
- },
32
+ "peerDependencies": {},
35
33
  "devDependencies": {
36
- "@types/jest": "^28.1.4",
37
- "eslint": "^8.19.0",
38
- "jest": "^28.1.2",
39
- "ts-jest": "^28.0.5",
40
- "typescript": "^4.7.4"
34
+ "@types/jest": "^29.0.3",
35
+ "eslint": "^8.23.1",
36
+ "jest": "^29.0.3",
37
+ "ts-jest": "^29.0.1",
38
+ "typescript": "^4.8.3"
41
39
  }
42
40
  }