UI5 / UI5/typescript

ManagedObject.extend third optional parameter "FNMetaImpl?"

Open
#520 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
213
Forks
35
Avg merge
37m
Merged PRs (30d)
1

Description

In the ManagedObject "extend" function documentation you can see that it is possible to use the third parameter for specifying a Constructor function for the metadata object.

Since in TS you don't call directly the "extend" function but rather the builder/transpiler does it, how can one pass a custom metadata costructor to the definition of a custom class?

Since metadata information (that are part of the second parameter "oClassInfo?" in the "extend" call) are automagically passed by defining a "public static metadata" (or "static readonly metadata", not very clear) attribute in the class (and doesn't always work...) , I suspect that there mey be something along the same line, like defining a static "metadataImplementation" or similar?

Is there an alternative way to define and use a custom metadata constructor for my custom class?

Thanks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ManagedObject.extend documentation and the TypeScript builder/transpiler path that handles the class definition. Trace how the second-parameter metadata is represented and whether the third FNMetaImpl parameter is exposed. Done means establishing and documenting a supported way to provide a custom metadata constructor, or clarifying that none exists.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.