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

TypeScript transformer for React Refresh #19914

Closed
wants to merge 33 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
0b6b314
test: split test cases out to share with ts
Jack-Works Sep 26, 2020
ebec748
feat: impl component finding
Jack-Works Sep 26, 2020
b0e83b4
feat: able to track hooks calls
Jack-Works Sep 26, 2020
78c86d1
fix: use outdated node
Jack-Works Sep 26, 2020
1b1b416
feat: able to insert signature calls
Jack-Works Sep 26, 2020
1d5a156
chore: use paran
Jack-Works Sep 26, 2020
8a0ab66
fix: also wrap hoc fns
Jack-Works Sep 26, 2020
09f5b14
fix: rest cases
Jack-Works Sep 26, 2020
5f34534
chore: remove unused vars
Jack-Works Sep 26, 2020
218b0d4
feat: generate signature for builtin hooks
Jack-Works Sep 27, 2020
182e81c
feat: track custom hooks
Jack-Works Sep 27, 2020
8caf2f2
test: add test cases
Jack-Works Sep 27, 2020
eae20b6
fix: aliased improt not tracked
Jack-Works Sep 27, 2020
a88eb33
chore: remove extra false param
Jack-Works Sep 27, 2020
0553d1b
fix: export default hooks
Jack-Works Sep 27, 2020
8139cc7
feat: add emit hash
Jack-Works Sep 27, 2020
d020fa2
chore: make it more pure
Jack-Works Sep 27, 2020
a827f0a
refactor
Jack-Works Sep 27, 2020
91d280e
refactor
Jack-Works Sep 27, 2020
caf3aa2
refactor
Jack-Works Sep 27, 2020
fe8db84
refactor
Jack-Works Sep 27, 2020
775abee
test: add a new case
Jack-Works Sep 27, 2020
792a7f7
chore: move ts into opts
Jack-Works Sep 28, 2020
4ae646b
fix: break when downgrading ?? and ?. syntax
Jack-Works Sep 29, 2020
aed1d14
chore: update snapshot
Jack-Works Sep 29, 2020
4fb4f52
fix: some runtime error
Jack-Works Sep 29, 2020
ec6180d
fix: some runtime error
Jack-Works Sep 29, 2020
abfb1be
use ts 4.0 factory API
Jack-Works Sep 28, 2020
fcdbb2d
use create temp var
Jack-Works Sep 28, 2020
dea9ef4
Merge branch 'master' into ts-react-refresh
Jack-Works Oct 5, 2020
8b9d686
throw on ts v3
Jack-Works Oct 5, 2020
1e1e12f
chore: add a .d.ts file for /typescript entry
Jack-Works Oct 24, 2020
8448fe2
chore: add a .d.ts file for /typescript entry
Jack-Works Oct 24, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/react-refresh/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@
},
"engines": {
"node": ">=0.10.0"
},
"devDependencies": {
"typescript": "^4.0"
}
}
4 changes: 2 additions & 2 deletions packages/react-refresh/src/ReactFreshBabelPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ export default function(babel, opts = {}) {
case 'React.useRef':
case 'useContext':
case 'React.useContext':
case 'useImperativeMethods':
case 'React.useImperativeMethods':
case 'useImperativeHandle':
case 'React.useImperativeHandle':
case 'useDebugValue':
case 'React.useDebugValue':
return true;
Expand Down
Loading