-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: initialize typescript #60
feat: initialize typescript #60
Conversation
8c5d2c8
to
c5cfc1a
Compare
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 think this is looking great. Thank you so much.
I want this PR to be sort of a smaller step, so i made comments to keep the babel process while allowing typescript to do checking instead of outputting JS. If you make those smaller changes, i'll merge this. Thanks again!
2223658
to
c8a1af5
Compare
Hi! Sorry, my mind's been completely elsewhere lately and I left this. Agreed with the approach of keeping babel -- I made the changes you suggested. |
c8a1af5
to
e88775b
Compare
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.
Looks great! Just a few smaller comments. Don't worry about the typechecking errors. We can work on that on another issue. For this first step, I want this merged in so other contributors can start contributing in typescript.
We just have to make sure that the build output is the same.
A rebase onto main would fix those errors. |
e88775b
to
31ebed6
Compare
31ebed6
to
afe4443
Compare
To compare the build outputs, I ran the builds and
followed by a string of characters. It seems this corresponds to babel's source map option. The only other 'true diff' I saw apart from this was the following, where ❯ diff dist/index.js maindist/index.js
4c4
< exports.superglueReducer = exports.pageReducer = exports.mapDispatchToPropsIncludingVisitAndRemote = exports.getIn = exports.fragmentMiddleware = exports.UPDATE_FRAGMENTS = exports.SAVE_RESPONSE = exports.REMOVE_PAGE = exports.GRAFTING_SUCCESS = exports.GRAFTING_ERROR = exports.COPY_PAGE = exports.BEFORE_VISIT = exports.BEFORE_REMOTE = exports.BEFORE_FETCH = exports.ApplicationBase = void 0;
---
> exports.updateFragments = exports.superglueReducer = exports.pageReducer = exports.mapDispatchToPropsIncludingVisitAndRemote = exports.getIn = exports.fragmentMiddleware = exports.UPDATE_FRAGMENTS = exports.SAVE_RESPONSE = exports.REMOVE_PAGE = exports.GRAFTING_SUCCESS = exports.GRAFTING_ERROR = exports.COPY_PAGE = exports.BEFORE_VISIT = exports.BEFORE_REMOTE = exports.BEFORE_FETCH = exports.ApplicationBase = void 0;
10a11
> exports.updateFragments = _reducers.updateFragments; I'm not entirely sure what could be causing this difference, but it doesn't seem super harmful to me -- though I'm not entirely familiar yet with superglue! Let me know if there's anything else to fix up, otherwise I think this may be a decent starting point! |
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 looked through the PR. CI is failing because of eslint. We can ignore that, i'll add another story for that. The output is also slightly different because typescript caught an undefined export updateFragments
, which is great!
I had to other comments that i'd like addressed, and i'll merge away! Thanks for working on this.
A first jab at introducing ts/tsx to this repo!
cc @jhash