Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce valueType setting for properties to support @type annotation #457

Conversation

devtomtom
Copy link
Member

The runtime metadata is currently limited to basic types like int, object, any. For example, with Date-based controls, using any in TypeScript is not ideal. Typically, the preferred types are UI5Date or the native Date.

To address this, introducing the valueType property and use it for displaying in the API Reference.

Copy link

cla-assistant bot commented May 15, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@devtomtom devtomtom force-pushed the introduce-valueType-setting-for-properties branch from c7d221a to 78e7682 Compare May 15, 2024 07:07
@devtomtom devtomtom marked this pull request as draft May 15, 2024 07:08
@@ -156,8 +156,8 @@ function createConstructorSettingsInterfaces(

if (
!(
prop.type.kind === "TypeReference" &&
prop.type.typeName === "string"
prop.valueType.kind === "TypeReference" &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not happy with the name valueType. The old type also is a type of the property's value. It's just a broader, less limiting type.

The new type is more specific, it's the semantic type whereas type is the type that ManagedObject can handle.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formalType (as opposed to "actual" runtime type?)
or
apiType since it's the APIs signature?

@devtomtom
Copy link
Member Author

Not needed because we tend to redefine the type property with the content of the @type tag.

@devtomtom devtomtom closed this May 16, 2024
@devtomtom devtomtom deleted the introduce-valueType-setting-for-properties branch May 16, 2024 08:09
@BenReim
Copy link

BenReim commented May 16, 2024

@devtomtom Would this be a solution that applies for the interface generator as well (#427) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants