Skip to content

PR to src/search.js Typescript Translation#62

Open
Cedgo1997 wants to merge 32 commits intoUSB-CI3715:f24from
Cedgo1997:f24
Open

PR to src/search.js Typescript Translation#62
Cedgo1997 wants to merge 32 commits intoUSB-CI3715:f24from
Cedgo1997:f24

Conversation

@Cedgo1997
Copy link

This is a PR for the Issue #1

This pull request introduces a transition from JavaScript to TypeScript in our project, focusing on enhancing type safety, code readability, and maintainability.

The new implementation utilizes explicit type annotations for function parameters and return types, which ensures that the correct data types are used throughout the code.

The updated code introduces interfaces and type definitions to clearly define the shape of objects. This promotes better documentation and understanding of the codebase. Some of the new interfaces are in the interfaces directory located in src/interfaces, these are: ISearchData, IPost, ITopic, and ITag.

Some eslint features were disabled, I experimented some problems caused by javascript imports and error handling with async/await, disabling these rules allows us to maintain functionality while we gradually migrate the codebase to fully utilize TypeScript’s features.

I needed to make some changes on tests so they could be covered.

cgonzalez-chattigo and others added 30 commits October 14, 2024 01:58
- GetSearchCids typed
- sortPosts typed
- Create new interceptor exppression in getSearchCids to convert categories into number before calling uniq method
- Updated utils.js adding elapsedTimeSince as method to use without process
- @typescript-eslint/no-unsafe-argument
- @typescript-eslint/no-unsafe-assignment
- @typescript-eslint/no-unsafe-return
- No way to get over these errors
Merging f24 last commits to current branch
Cedgo1997 and others added 2 commits October 14, 2024 17:28
@coveralls
Copy link

Pull Request Test Coverage Report for Build 11335377244

Details

  • 166 of 220 (75.45%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.007%) to 82.678%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/search.js 160 214 74.77%
Totals Coverage Status
Change from base Build 11313630816: 0.007%
Covered Lines: 22349
Relevant Lines: 25609

💛 - Coveralls

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.

3 participants