Skip to content

handled case of assets union #3060

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

Merged
merged 3 commits into from
May 8, 2024
Merged

handled case of assets union #3060

merged 3 commits into from
May 8, 2024

Conversation

nitzanyiz
Copy link
Collaborator

Description

Fixed typings when assets where loaded to an already loaded path. When loading to an already loaded path the type was overridden and not combined.

Changelog

Assets - Fix loading assets typings to preloaded path.

Additional info

MADS-4126

moved asset types to differenct file
@nitzanyiz nitzanyiz requested a review from ethanshar May 7, 2024 06:22
@nitzanyiz nitzanyiz marked this pull request as ready for review May 7, 2024 06:23
@@ -0,0 +1,22 @@
type DotExtendedString<T extends string> = `${T}.`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok, I reviewed this again, this time more thoroughly..
Since the TS utils are pretty complicated to understand at first glance I'd suggest to make them more readable.

  1. I'd change params names like T and K to something with more meaning..
    for example, maybe change this AssetRecord<T extends string, K extends object = {}, This extends object> to AssetRecord<PATH extends string, ASSETS extends object = {}, ASSETS_CLASS extends object>
  2. Let's add a short description above the complicated utils of what exactly they do. If we'll have to investigate an issue in the future it can be very useful
  3. RecRecord util's name is not so clear, can you think of a better name?

@nitzanyiz nitzanyiz requested a review from ethanshar May 8, 2024 08:35
@ethanshar ethanshar merged commit 2bff5d1 into master May 8, 2024
1 check passed
@ethanshar ethanshar deleted the fix/assetsUnionTypings branch May 8, 2024 12:47
nitzanyiz added a commit that referenced this pull request Jun 2, 2024
ethanshar pushed a commit that referenced this pull request Jun 2, 2024
* Revert "handled case of assets union (#3060)"

This reverts commit 2bff5d1.

* Revert "Assets Typing (#3051)"

This reverts commit 83ff9a6.

* kepts assets typings file

* changed assets import

* changed configrations
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.

2 participants