Mixing base canonical types


#1

Could you give an example of how to declare a canonical that mixes a base canonical type?


#2
  1. You need the base type to be a canonical

type BaseCanonical mixes Canonical {
fieldA: string
fieldB: string

}

type Canonical1 mixes BaseCanonical, Canonical {
field1: string

}

type Canonical2 mixes BaseCanonical, Canonical {
field2: string

}

  1. You do not need the base type

type BaseCanonicalFields {
fieldA: string
fieldB: string

}

type Canonical1 mixes BaseCanonicalFields, Canonical {
field1: string

}

type Canonical2 mixes BaseCanonicalFields, Canonical {
field2: string

}