Skip to content

Second+ level "metadata" inheritance issues #338

@iljapostnovs

Description

@iljapostnovs

There are conflicts with extending the class which extends standard UI5 class.
Example:
MyControl extends Control, contains test property
OneMoreControl extends MyControl, contains anotherTest property
image

OneMoreControl gets error:
Class static side 'typeof OneMoreControl' incorrectly extends base class static side 'typeof MyControl'.\n The types of 'metadata.properties' are incompatible between these types.\n Property 'test' is missing in type '{ anotherTest: string; }' but required in type '{ test: { type: string; }; }'.

There are two ways of dealing with it:

  1. Adding properties to OneMoreControl from MyControl, but I guess it would fail at runtime, because, if I recall correctly, metadata field is removed at runtime by UI5 framework.
  2. Adding @ts-expect-error

Both options seems to be bad.
Any suggestions? Thanks!

Metadata

Metadata

Assignees

Labels

ts-interface-generatorRelated to the ts-interface-generator sub-package

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions