-
-
Notifications
You must be signed in to change notification settings - Fork 58
Feature/add typescript support #229
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
Open
Maxi10022
wants to merge
40
commits into
Saifullah-dev:main
Choose a base branch
from
Maxi10022:feature/add-typescript-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature/add typescript support #229
Maxi10022
wants to merge
40
commits into
Saifullah-dev:main
from
Maxi10022:feature/add-typescript-support
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Renamed all `.js` and `.jsx` files to `.ts` and `.tsx` respectively. Added tsconfig.json. Started defining common types and functions, located in "/src/types". Added type annotations to all contexts.
Now fully implemented this context, forgot adding that in previos commit.
Does not seem to be working with TypeScript, removed for now.
Added correct type annotations
Added type annotations.
Defined `TranslationFunction` which allows for passing parameters to `i18n`.
Fixed import of the `OnFolderChange` type
Added guard clauses to throw when `undefined` on `use[Context]` calls.
This allows to continue using hooks like this:
```
const { files } = useFiles();
```
Added `OnRefresh` type
Added type annotations
Configured lib to be `ESNect`
Now uses the `TriggerAction` and `TriggerActionType` defined in a seperate file
Added property types for each component.
Added type annotations and defined return type (`AxiosResponse`) where needed.
Was not yet fully configured ported to TypeScript
Made some parameters nullable.
The list of files copied to the clipboard are no longer nullable.
Added parameter `[key: string]: any` to `File` for JS-compatability, e.g. people setting an id in JS, not defined in the TypeScript type. Added `FileExtended` type for internal usage.
Allows for the `import.meta.env` to be recognized
Defined response type.
Added `previewFile` to defined trigger action types. Reanmed all usages of custom `File` type to `IFile`, now allows the `OnFileUploading` type to take in the actual nodejs file.
Both now use the `FileExtended` type
Now builds the project correctly, and also adds types.
Added all types which may be used by TypeScript users.
Added basic sample for TypeScript usage, and link to samples folder.
Owner
|
@Maxi10022 Thanks for this contribution 🙌, looks good :) |
Author
|
@Saifullah-dev let me know if any changes or fixes are needed |
Owner
|
@Maxi10022 Sorry for the delay. I was quite busy past few days. I'll hopefully review and merge this over the weekend. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
Added TypeScript support - see issue #92.
Samples on JavaScript usage and TypeScript usage have also been added, using the TypeScript based package (from file).
Note docs might still need updates documenting the newly added TypeScript types, didn't have anymore time to do this.
Completed Tasks:
@Saifullah-dev let me know if there's are any changes or fixes needed.