Skip to content

Conversation

@susnux
Copy link
Contributor

@susnux susnux commented Apr 27, 2024

No description provided.

@susnux susnux added bug Something isn't working 3. to review Waiting for reviews labels Apr 27, 2024
@susnux susnux requested review from Pytal and artonge April 27, 2024 19:53
…or conflict utils functions

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
export type ConflictResolutionResult = {
selected: (File|FileSystemEntry|Node)[],
renamed: (File|FileSystemEntry|Node)[],
export type ConflictResolutionResult<T extends File|FileSystemEntry|Node> = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should create a type out of those to ease its use?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this makes sense, but I need generics here to allow returning the same as the input.
E.g. if you put in an array of File you also get back an array of File and not Array<File|Node|FileSystemEntry>.
So this prevents casting it every time you use it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants