Skip to content

refactor: use internal FileEntry type#92

Merged
cguedes merged 6 commits into
mainfrom
create-internal-file-entry-type
Jun 6, 2023
Merged

refactor: use internal FileEntry type#92
cguedes merged 6 commits into
mainfrom
create-internal-file-entry-type

Conversation

@sehyod

@sehyod sehyod commented Jun 5, 2023

Copy link
Copy Markdown
Collaborator

Fixes #75

Problem
Our code should not rely on the tauri FileEntry type. Moreover, this type lacks some useful fields like isFolder

Solution
Create our own internal FileEntry type with a discriminating union. The tauri type should only appear in the interface (filesystem.ts), which then converts it to our internal type, which is used acrossed the rest of the app

@sehyod sehyod requested a review from cguedes June 5, 2023 13:25

@cguedes cguedes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just added a note about the dotfiles

Comment thread src/components/FileTree.tsx Outdated
@sehyod sehyod requested a review from cguedes June 5, 2023 14:00
cguedes
cguedes previously approved these changes Jun 5, 2023
@cguedes cguedes self-requested a review June 5, 2023 15:03
@cguedes cguedes merged commit 0c5bc16 into main Jun 6, 2023
@cguedes cguedes deleted the create-internal-file-entry-type branch June 6, 2023 09:50
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.

Create an internal FileEntry type

2 participants