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

refactor: clean TS errors, add TS rules, cmn types #45

Merged

Conversation

ChristopherGabba
Copy link
Contributor

Summary

This is my first PR to an open source project ever, so feel free to shoot down.

  1. Added descriptions to some of the types
  2. Created a common type between them in some instances
  3. Added some additional TSConfig rules used in some big open source projects
  4. Removed all the Typescript warnings within useShareIntent.

Trying to keep this PR small and management because I'm still learning. Feel free to shut down this PR.

Todo

I added some TODO text to the types that eventually would be ideal to clean up and get one common type. I'm not bold enough to mess with the native code yet.

Issue

No Github issues. Just trying to add some comments and be helpful.

Copy link
Owner

@achorein achorein left a comment

Choose a reason for hiding this comment

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

Thanks for helping improving the code documentation, i made some little comments

tsconfig.json Outdated Show resolved Hide resolved
tsconfig.json Outdated Show resolved Hide resolved
@@ -81,7 +87,8 @@ const parseShareIntent = (value, options): ShareIntent => {
type: isMedia ? "media" : "file",
};
}
options.debug && console.debug("useShareIntent[parsed] ", result);
options.debug &&
console.debug("useShareIntent[parsed] ", JSON.stringify(result, null, 4));
Copy link
Owner

Choose a reason for hiding this comment

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

👍

src/useShareIntent.tsx Outdated Show resolved Hide resolved
src/useShareIntent.tsx Outdated Show resolved Hide resolved
src/useShareIntent.tsx Outdated Show resolved Hide resolved
src/ExpoShareIntentModule.types.ts Outdated Show resolved Hide resolved
src/ExpoShareIntentModule.types.ts Outdated Show resolved Hide resolved
src/ExpoShareIntentModule.types.ts Outdated Show resolved Hide resolved
src/useShareIntent.tsx Outdated Show resolved Hide resolved
@achorein achorein force-pushed the small-updates-to-expo-share-intent branch from 041f784 to 4bed6a0 Compare April 18, 2024 15:04
@achorein
Copy link
Owner

@ChristopherGabba I updated this PR, is that fine for you ?

@achorein achorein changed the title refactor: clean TS errors, add TS rules, cmn types chore: clean TS errors, add TS rules, cmn types Apr 18, 2024
Copy link
Contributor Author

@ChristopherGabba ChristopherGabba left a comment

Choose a reason for hiding this comment

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

Thanks @achorein, I appreciate you giving me a few wins on my first commit ever, looks good. :)

@achorein achorein changed the title chore: clean TS errors, add TS rules, cmn types refactor: clean TS errors, add TS rules, cmn types Apr 18, 2024
@achorein achorein merged commit cff3e50 into achorein:main Apr 18, 2024
4 checks passed
achorein added a commit that referenced this pull request Apr 19, 2024
* refactor: clean TS errors, add TS rules, cmn types

---------

Co-authored-by: Anselme Chorein <[email protected]>
Co-authored-by: achorein <[email protected]>
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