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

Migrate Reselect source to TS #511

Merged
merged 11 commits into from
Oct 17, 2021
Merged

Conversation

markerikson
Copy link
Contributor

@markerikson markerikson commented Oct 17, 2021

This PR:

  • Renames index.js to index.ts
  • Rewrites index.ts to actually be TypeScript, using all the types updates from TypeScript update for 4.x #486
  • Extracts the reusable types to a new types.ts file
  • Temporarily leaves the pre-migration typedefs around as src/old-typedefs.ts
  • Updates the build tooling to correctly build the right artifacts while compiling TS source and generating output types, based on the setup we just added recently for React-Redux (including renaming all the build commands to match)
  • Adds a Prettier config file copied from React-Redux
  • Rewrites the test setup to use Jest+ts-jest instead of Mocha
  • migrates the test file from JS+Mocha to TS+Jest
  • Adds some additional typetests and formats the test file (hence the big diff)

- Moved over reusable types
- Updated all methods with their actual typedefs
- Renamed index.d.ts to leave it as a reference for now
- Updated all "build:x" scripts based on React-Redux package
- Added tsconfig and TS types output, and moved TS output to ./es
- Added Babel compilation of TS syntax
@codecov
Copy link

codecov bot commented Oct 17, 2021

Codecov Report

Merging #511 (82cdbbc) into master (78fc27f) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #511   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         1    -1     
  Lines           21        53   +32     
  Branches         0         7    +7     
=========================================
+ Hits            21        53   +32     
Impacted Files Coverage Δ
src/index.ts 100.00% <100.00%> (ø)
.babelrc.js

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.

1 participant