Skip to content

Commit 3b27f24

Browse files
authored
fix: replace unique symbols with noSuggest (#1231)
1 parent c31c88c commit 3b27f24

File tree

7 files changed

+21
-20
lines changed

7 files changed

+21
-20
lines changed

ark/attest/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ark/attest",
3-
"version": "0.31.0",
3+
"version": "0.32.0",
44
"license": "MIT",
55
"author": {
66
"name": "David Blass",

ark/fs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ark/fs",
3-
"version": "0.27.0",
3+
"version": "0.28.0",
44
"license": "MIT",
55
"author": {
66
"name": "David Blass",

ark/schema/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ark/schema",
3-
"version": "0.27.0",
3+
"version": "0.28.0",
44
"license": "MIT",
55
"author": {
66
"name": "David Blass",

ark/type/attributes.ts

+15-14
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import type { ArkError, ArkErrors, Morph } from "@ark/schema"
2-
import type {
3-
anyOrNever,
4-
array,
5-
Brand,
6-
equals,
7-
Hkt,
8-
intersectArrays,
9-
isSafelyMappable,
10-
Primitive,
11-
show
2+
import {
3+
noSuggest,
4+
type anyOrNever,
5+
type array,
6+
type Brand,
7+
type equals,
8+
type Hkt,
9+
type intersectArrays,
10+
type isSafelyMappable,
11+
type Primitive,
12+
type show
1213
} from "@ark/util"
1314
import type { arkPrototypes } from "./keywords/constructors.ts"
1415
import type { type } from "./keywords/keywords.ts"
@@ -202,10 +203,10 @@ export type inferMorphOut<morph extends Morph> = Exclude<
202203
ArkError | ArkErrors
203204
>
204205

205-
declare const morphOutSymbol: unique symbol
206+
const isMorphOutKey = noSuggest("isMorphOut")
206207

207208
export interface Out<o = any> {
208-
[morphOutSymbol]: true
209+
[isMorphOutKey]: true
209210
t: o
210211
introspectable: boolean
211212
}
@@ -216,9 +217,9 @@ export interface To<o = any> extends Out<o> {
216217

217218
export type InferredMorph<i = any, o extends Out = Out> = (In: i) => o
218219

219-
declare const defaultsTo: unique symbol
220+
const defaultsToKey = noSuggest("defaultsTo")
220221

221-
export type Default<t = unknown, v = unknown> = { [defaultsTo]: [t, v] }
222+
export type Default<t = unknown, v = unknown> = { [defaultsToKey]: [t, v] }
222223

223224
// we have to distribute over morphs to preserve the i/o relationship
224225
// this avoids stuff like:

ark/type/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "arktype",
33
"description": "TypeScript's 1:1 validator, optimized from editor to runtime",
4-
"version": "2.0.0-rc.27",
4+
"version": "2.0.0-rc.28",
55
"license": "MIT",
66
"author": {
77
"name": "David Blass",

ark/util/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ark/util",
3-
"version": "0.27.0",
3+
"version": "0.28.0",
44
"license": "MIT",
55
"author": {
66
"name": "David Blass",

ark/util/registry.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { FileConstructor, objectKindOf } from "./objectKinds.ts"
77
// recent node versions (https://nodejs.org/api/esm.html#json-modules).
88

99
// For now, we assert this matches the package.json version via a unit test.
10-
export const arkUtilVersion = "0.27.0"
10+
export const arkUtilVersion = "0.28.0"
1111

1212
export const initialRegistryContents = {
1313
version: arkUtilVersion,

0 commit comments

Comments
 (0)