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

Added dot notation along with appropriate types #3

Merged
merged 4 commits into from
Nov 15, 2022
Merged

Conversation

newclarityex
Copy link
Contributor

@newclarityex newclarityex commented Nov 15, 2022

This fork adds dot notation with working TS support and removes the 'has' function as I felt it was irrelevant.

@harshkhandeparkar
Copy link
Owner

Thanks a lot for your contribution!
I had one suggestion:
The has function was added since this library was inspired by electron-settings which also exports a has function. This library tries to make switching from electron to tauri easier by providing a similar API that can be migrated to. Could you revert the change?

I'll review the rest of the changes soon.

@newclarityex
Copy link
Contributor Author

Oh I didn't realize, I've reverted the has change. Everything else should work mostly the same, only with added dot notation.

@harshkhandeparkar
Copy link
Owner

Thanks! I won't merge this into main yet. A few things need to be done still:

  1. Updating the documentation
  2. Dot notation for arrays key1.key2[3] which is allowed in electron-settings. (If it isn't possible, the documentation should be updated appropriately)

I'll create a new branch and merge this PR into it. You can contribute further if you wish or I'll handle this and try to release this ASAP!

@harshkhandeparkar harshkhandeparkar changed the base branch from main to dot-notation November 15, 2022 16:53
@harshkhandeparkar
Copy link
Owner

Dot notation for arrays key1.key2[3] which is allowed in electron-settings. (If it isn't possible, the documentation should be updated appropriately)

Is it possible?

src/index.ts Outdated Show resolved Hide resolved
src/settings-manager/settings-manager.ts Outdated Show resolved Hide resolved
src/settings-manager/settings-manager.ts Outdated Show resolved Hide resolved
src/settings/getter-setter.ts Outdated Show resolved Hide resolved
@newclarityex
Copy link
Contributor Author

Dot notation for arrays key1.key2[3] which is allowed in electron-settings. (If it isn't possible, the documentation should be updated appropriately)

Is it possible?

I don't think I'm able to. electron-settings does have that functionality, but I checked and the way it's implemented has incomplete TS support.

@harshkhandeparkar harshkhandeparkar merged commit 4b1a795 into harshkhandeparkar:dot-notation Nov 15, 2022
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