@sidex/types 0.0.1 → 0.0.3

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@sidex/types",
3
3
  "author": "Silitics GmbH <info@silitics.com>",
4
4
  "license": "(MIT or Apache-2.0)",
5
- "version": "0.0.1",
5
+ "version": "0.0.3",
6
6
  "description": "",
7
7
  "main": "src/index.ts",
8
8
  "keywords": [],
package/src/builtins.ts CHANGED
@@ -223,7 +223,7 @@ function toNumber(x: Numeric): number {
223
223
  export type Bool = boolean
224
224
 
225
225
  /**
226
- *
226
+ *
227
227
  */
228
228
  export type Unit = null
229
229
 
@@ -257,7 +257,7 @@ export function entries<K, V>(map: AnyMap<K, V>): [K, V][] {
257
257
  if (Array.isArray(map)) {
258
258
  return map
259
259
  } else {
260
- return Object.entries(map) as [K, V][]
260
+ return Object.entries(map) as unknown as [K, V][]
261
261
  }
262
262
  }
263
263
 
package/src/nominal.ts CHANGED
@@ -6,7 +6,9 @@ declare const SIDEX_PATH_SYMBOL: unique symbol
6
6
  /**
7
7
  * A nominal type based on `T` and identified by it's Sidex path `P`.
8
8
  */
9
- export type Nominal<T, P extends string> = T & { [SIDEX_PATH_SYMBOL]: P }
9
+ export type Nominal<T, P extends string> = T & {
10
+ [SIDEX_PATH_SYMBOL]: { [key in P]: null }
11
+ }
10
12
 
11
13
  /**
12
14
  * The structural type of a nominal type `T`.