Skip to content

Commit

Permalink
fix: more schema-schema fixes and tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg committed Jun 23, 2021
1 parent 18ea55f commit 4d0f3b7
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions schema-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export type KindLink = {}
export type KindUnion = {}
export type KindStruct = {}
export type KindEnum = {}

export type TypeBool = { kind: "bool" }
export type TypeString = { kind: "string" }
export type TypeBytes = {
Expand All @@ -36,7 +35,6 @@ export type MapRepresentation =
| { stringpairs: MapRepresentation_StringPairs }
| { listpairs: MapRepresentation_ListPairs }
| { advanced: AdvancedDataLayoutName }

export type MapRepresentation_Map = {}
export type MapRepresentation_StringPairs = {
innerDelim: KindString
Expand Down Expand Up @@ -67,7 +65,8 @@ export type UnionRepresentation =
| { envelope: UnionRepresentation_Envelope }
| { inline: UnionRepresentation_Inline }
| { byteprefix: UnionRepresentation_BytePrefix }
export type UnionRepresentation_Kinded = { [k in RepresentationKind]?: TypeName }
export type UnionRepresentation_Kinded = { [k in RepresentationKind]?: KindedType }
export type KindedType = TypeName | TypeLink
export type UnionRepresentation_Keyed = { [k in KindString]: TypeName }
export type UnionRepresentation_Envelope = {
discriminantKey: KindString
Expand All @@ -78,10 +77,7 @@ export type UnionRepresentation_Inline = {
discriminantKey: KindString
discriminantTable: { [ k in KindString]: TypeName }
}
export type UnionRepresentation_BytePrefix = {
discriminantTable: { [ k in TypeName]: KindInt }
}

export type UnionRepresentation_BytePrefix = { [ k in TypeName]: KindInt }
export type TypeStruct = {
kind: "struct"
fields: { [ k in FieldName]: StructField }
Expand Down Expand Up @@ -124,8 +120,6 @@ export type StructRepresentation_StringJoin = {
fieldOrder?: FieldName[]
}
export type StructRepresentation_ListPairs = {}


export type TypeEnum = {
kind: "enum"
members: { [ k in EnumValue]: KindNull }
Expand All @@ -141,7 +135,6 @@ export type TypeCopy = {
kind: "copy"
fromType: TypeName
}

export type TypeName = string
export type SchemaMap = { [ k in TypeName]: Type }
export type AdvancedDataLayoutName = string
Expand All @@ -162,7 +155,6 @@ export type Type =
| TypeStruct
| TypeEnum
| TypeCopy

export type TypeKind =
KindBool
| KindString
Expand All @@ -175,7 +167,6 @@ export type TypeKind =
| KindUnion
| KindStruct
| KindEnum

export type RepresentationKind =
"bool"
| "string"
Expand All @@ -186,7 +177,6 @@ export type RepresentationKind =
| "map"
| "list"
| "link"

export type AnyScalar =
KindBool
| KindString
Expand Down

0 comments on commit 4d0f3b7

Please sign in to comment.