Issue with Type Hinting in a Union Schema with Similar Properties

hi, type hint for this schema is not proper, can it be because Location also share same properties as object, that is, city, region, country?
Schema.Union(
  Schema.declare((input: unknown): input is Location => input instanceof Location && input.$isPersisted, {
    identifier: 'Location',
    description: 'Location model instance',
  }),
  Schema.Struct({
    city: Schema.optionalWith(Schema.NullOr(Schema.String), { default: () => null }),
    region: Schema.optionalWith(Schema.NullOr(Schema.String), { default: () => null }),
    country: Schema.optionalWith(Schema.NullOr(Schema.String), { default: () => null }),
  })
)
Was this page helpful?