Closed Silic0nS0ldier closed 6 years ago
Oh, off topic but I think prepare
or prepublishOnly
would be a better choice than prepublish
in scripts. NPM has a weird behaviour with the command, wherein despite its name, it gets run after npm install
. End result is that with how the scripts are set up, Travis wastes time performing build
twice. No... Actually 3 times. Huh.
Don't merge this. Thought I had it all done and dusted, but when I applied it to my TypeScript based project it threw everything back in my face. Bare with me while I figure this out.
Bad case of me not observing the obvious. Ultimately it boiled down to TypeScript not allowing an untyped generic as a type for a field. I've updated to account for this inability. No clue why the test case failed to pick this up (the values before should have raised errors).
@Silic0nS0ldier Thank you so much for this. Is it all good to review?
Yeah, its good for review.
published 🎉 🎉 🎉 🎉
Thanks @Silic0nS0ldier
This doesn’t allow for extension of the component (to allow for additional props to be passed).
Example code that now doesn’t work:
<AsyncRoute
path="/sign-in"
getComponent={() =>
import(/* webpackChunkName: "sign-in" */ './routes/sign-in').then(
module => module.default
)
}
authService={App.authService}
fetchService={App.fetchService}
/>
I've added TypeScript definitions and the appropriate testing. If there are any suggestions or corrections to be made, just let me know.