@arktype/util
Advanced tools
Comparing version 0.14.0 to 0.15.0
@@ -43,3 +43,3 @@ import type { Primitive } from "./domain.ts"; | ||
export type nominal<t, id extends string> = t & { | ||
readonly [keyNonimal]: id; | ||
readonly [keyNonimal]: [t, id]; | ||
}; | ||
@@ -46,0 +46,0 @@ export type satisfy<base, t extends base> = t; |
@@ -21,5 +21,5 @@ import type { array } from "./arrays.ts"; | ||
} ? serialized : t extends Function ? `Function(${string})` : t extends Date ? string : depth["length"] extends 10 ? unknown : t extends array<infer item> ? array<snapshot<item, [...depth, 1]>> : { | ||
[k in keyof t]: snapshot<t[k], [...depth, 1]>; | ||
[k in keyof t as snapshotPrimitive<k>]: snapshot<t[k], [...depth, 1]>; | ||
}; | ||
type snapshotPrimitive<t> = t extends symbol ? `(Symbol${string})` : t; | ||
type snapshotPrimitive<t> = t extends symbol ? `Symbol(${string})` : t; | ||
export declare const print: (data: unknown, indent?: number) => void; | ||
@@ -26,0 +26,0 @@ export declare const printable: (data: unknown, indent?: number) => string; |
@@ -49,2 +49,5 @@ import { domainOf } from "./domain.js"; | ||
result[k] = _serialize(o[k], opts, nextSeen); | ||
for (const s of Object.getOwnPropertySymbols(o)) { | ||
result[opts.onSymbol?.(s) ?? s.toString()] = _serialize(o[s], opts, nextSeen); | ||
} | ||
return result; | ||
@@ -51,0 +54,0 @@ } |
{ | ||
"name": "@arktype/util", | ||
"version": "0.14.0", | ||
"version": "0.15.0", | ||
"author": { | ||
@@ -5,0 +5,0 @@ "name": "David Blass", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
90582
1939