diff --git a/.changeset/eight-ducks-rush.md b/.changeset/eight-ducks-rush.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/eight-ducks-rush.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/packages/core/src/submodules/schema/schemas/NormalizedSchema.ts b/packages/core/src/submodules/schema/schemas/NormalizedSchema.ts index 2fd34fb2c43..25941d294ff 100644 --- a/packages/core/src/submodules/schema/schemas/NormalizedSchema.ts +++ b/packages/core/src/submodules/schema/schemas/NormalizedSchema.ts @@ -18,7 +18,12 @@ import type { StaticMapSchema, StaticOperationSchema, StaticSchema, - StaticSchemaId, + StaticSchemaIdError, + StaticSchemaIdList, + StaticSchemaIdMap, + StaticSchemaIdOperation, + StaticSchemaIdSimple, + StaticSchemaIdStruct, StaticSimpleSchema, StaticStructureSchema, StreamingBlobSchema, @@ -445,12 +450,12 @@ export function hydrate( const [id, ...rest] = ss; return ( { - [0 satisfies StaticSchemaId.Simple]: sim, - [1 satisfies StaticSchemaId.List]: list, - [2 satisfies StaticSchemaId.Map]: map, - [3 satisfies StaticSchemaId.Struct]: struct, - [-3 satisfies StaticSchemaId.Error]: error, - [9 satisfies StaticSchemaId.Operation]: op, + [0 satisfies StaticSchemaIdSimple]: sim, + [1 satisfies StaticSchemaIdList]: list, + [2 satisfies StaticSchemaIdMap]: map, + [3 satisfies StaticSchemaIdStruct]: struct, + [-3 satisfies StaticSchemaIdError]: error, + [9 satisfies StaticSchemaIdOperation]: op, }[id] as Function ).call(null, ...rest); } diff --git a/packages/types/src/schema/static-schemas.ts b/packages/types/src/schema/static-schemas.ts index 77bacf32da1..fea9fb232a3 100644 --- a/packages/types/src/schema/static-schemas.ts +++ b/packages/types/src/schema/static-schemas.ts @@ -8,14 +8,32 @@ import type { SchemaRef, SchemaTraits } from "../schema/schema"; /** * @alpha */ -export namespace StaticSchemaId { - export type Simple = 0; - export type List = 1; - export type Map = 2; - export type Struct = 3; - export type Error = -3; - export type Operation = 9; -} +export type StaticSchemaIdSimple = 0; + +/** + * @alpha + */ +export type StaticSchemaIdList = 1; + +/** + * @alpha + */ +export type StaticSchemaIdMap = 2; + +/** + * @alpha + */ +export type StaticSchemaIdStruct = 3; + +/** + * @alpha + */ +export type StaticSchemaIdError = -3; + +/** + * @alpha + */ +export type StaticSchemaIdOperation = 9; /** * @alpha @@ -41,23 +59,23 @@ export type ShapeNamespace = string; /** * @alpha */ -export type StaticSimpleSchema = [StaticSchemaId.Simple, ShapeNamespace, ShapeName, SchemaRef, SchemaTraits]; +export type StaticSimpleSchema = [StaticSchemaIdSimple, ShapeNamespace, ShapeName, SchemaRef, SchemaTraits]; /** * @alpha */ -export type StaticListSchema = [StaticSchemaId.List, ShapeNamespace, ShapeName, SchemaTraits, SchemaRef]; +export type StaticListSchema = [StaticSchemaIdList, ShapeNamespace, ShapeName, SchemaTraits, SchemaRef]; /** * @alpha */ -export type StaticMapSchema = [StaticSchemaId.Map, ShapeNamespace, ShapeName, SchemaTraits, SchemaRef, SchemaRef]; +export type StaticMapSchema = [StaticSchemaIdMap, ShapeNamespace, ShapeName, SchemaTraits, SchemaRef, SchemaRef]; /** * @alpha */ export type StaticStructureSchema = [ - StaticSchemaId.Struct, + StaticSchemaIdStruct, ShapeNamespace, ShapeName, SchemaTraits, @@ -69,7 +87,7 @@ export type StaticStructureSchema = [ * @alpha */ export type StaticErrorSchema = [ - StaticSchemaId.Error, + StaticSchemaIdError, ShapeNamespace, ShapeName, SchemaTraits, @@ -81,7 +99,7 @@ export type StaticErrorSchema = [ * @alpha */ export type StaticOperationSchema = [ - StaticSchemaId.Operation, + StaticSchemaIdOperation, ShapeNamespace, ShapeName, SchemaTraits,