-
Notifications
You must be signed in to change notification settings - Fork 12
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
0020 Proposal: Use TypeScript in Wallets Admin Client #28
Open
OlhaD
wants to merge
2
commits into
Greenstand:main
Choose a base branch
from
OlhaD:0020-proposal-use-typescript-in-wallets-client
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
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Use React with TypeScript instead of plain JavaScript in a new Wallets Admin Client | ||
|
||
- Status: proposed | ||
<!-- {proposed | rejected | accepted | deprecated | … | superseded by [ADR-0005](0005-example.md)} --> <!-- optional --> | ||
- Deciders: TBD | ||
<!-- Find deciders here: https://github.com/orgs/Greenstand/people --> | ||
- Date: 2023-04-06 | ||
|
||
Technical Story: {description | ticket/issue URL} <!-- optional --> | ||
|
||
## Context and Problem Statement | ||
|
||
Using TypeScript (and strong-typing) can bring to a project lots of benefits. | ||
|
||
## Decision Drivers <!-- optional --> | ||
|
||
- Type Safety: catching errors on compilation stage instead of runtime | ||
- Better code maintainability over the time | ||
- No need to rewrite the code when the project will grow up | ||
- TypeScript is already used on the Backend - Wallet API. Unified style will be easier for Full-Stack developers | ||
|
||
## Considered Options | ||
|
||
- **Option #1** Fully adopt TypeScript | ||
- **Option #2** Use basic features of TypeScript like types, interfaces, ect | ||
- **Option #3** Use plain JavaScript | ||
|
||
## Decision Outcome | ||
|
||
TBD | ||
|
||
## Pros and Cons of the Options <!-- optional --> | ||
|
||
### {option 1} | ||
|
||
Fully adopt TypeScript | ||
|
||
- Good, because we will benefit from type safety - will be able to catch errors early on compile time, not in runtime | ||
- Good, because it will give higher code mainteinability over time | ||
- Good, because it has better IDE support | ||
- Bad, because of the higher learning curve, expeacially for junior developers | ||
- Bad, because it will require additional project configuration | ||
|
||
### {option 2} | ||
|
||
Use basic features of TypeScript like types, interfaces, ect | ||
|
||
- Good, because we will have same advantages as with option 1 | ||
- Good, because it will be much easier for new developers to start with | ||
- Bad, because it will require additional project configuration | ||
|
||
### {option 3} | ||
|
||
Use plain JavaScript | ||
|
||
- Good, because it will not require people to learn TypeScript if they are not familiar with it | ||
- Bad, because we will not get benefits described in option 1 | ||
- … <!-- numbers of pros and cons can vary --> |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see option 2 as preferable to start with. It will bring us many benefits and not require too much effort to work with it for new people. If it goes well, we can gradually move to option 1 using more and more features if needed.