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

Ensure proper handling of both old (string) and new (object) formats in the global IDataModelBindings type #14441

Open
lassopicasso opened this issue Jan 16, 2025 · 0 comments

Comments

@lassopicasso
Copy link
Contributor

lassopicasso commented Jan 16, 2025

Description

The dataModelBindings component prop now supports both object and string types. However, there is an unintended shortcut in the code that prevents typescript from raising errors in some cases, such as in the convertDataBindingToInternalFormat function.

To address this, we need to update the type definition and handle the resulting typescript errors when the InternalBindingFormat type is properly introduced.

The convertDataBindingToInternalFormat works for some reason, even tho the const dataModelBinding is always a string according to typescript.
Image

Additional Information

No response

Tasks

  1. In global.ts, update the type definition line 19 to:
    export type IDataModelBindings = KeyValuePairs<string | InternalBindingFormat>;
  2. Resolve the typescript errors that will arise throughout the codebase after adding InternalBindingFormat to the type definition.

Acceptance Criterias

No response

@lassopicasso lassopicasso added kind/chore status/draft Status: When you create an issue before you have enough info to properly describe the issue. team/studio-domain2 labels Jan 16, 2025
@lassopicasso lassopicasso added added-to-sprint and removed status/draft Status: When you create an issue before you have enough info to properly describe the issue. labels Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant