Skip to content

Migrate Reselect source to TS#511

Merged
markerikson merged 11 commits into
masterfrom
feature/typescript-rewrite
Oct 17, 2021
Merged

Migrate Reselect source to TS#511
markerikson merged 11 commits into
masterfrom
feature/typescript-rewrite

Conversation

@markerikson
Copy link
Copy Markdown
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
Copy Markdown

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

@markerikson markerikson merged commit 86960ed into master Oct 17, 2021
@markerikson markerikson deleted the feature/typescript-rewrite branch October 17, 2021 21:51
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