-
Notifications
You must be signed in to change notification settings - Fork 15
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
Convert to TypeScript and use seatsio-types #135
Conversation
…o morten/typings-2
I was seeing that same error, have you ran yarn in seatsio-react as well? I added some type packages |
Yeah, I even removed the |
I just installed the latest IntelliJ and opened the project there. Works as expected, so not sure what the difference is. Will try killing |
Alright. I also did a `yarn build` in the root project.
|
Had some missing types in root package.json (probably after solving conflicts after merge from master). If you pull the latest, do the errors go away? See another issue though, I now get intellisense in VSCode, but not in IntelliJ. Investigating. UPDATE: Seems like IntelliJ gives suggestions for for instance |
Awesome, that fixed it 👍 |
Works like a charm 👍 👍 👍 One question though: do we need Babel, Webpack and rimraf? What's the advantage over just running |
TSC will only transpile into JavaScript, nothing more. If we want to focus on being a library that users will package on their own, I guess that is fine. Babel/Webpack handles minification, polyfills for older browsers etc. We might not need it for this small project, but I don't think it matters if we keep it. Rimraf is just a convenience package, cleaning the output folder before each build (essentially platform safe |
If we don't need Babel and Webpack I say we remove them - simpler is better, right? 😉 Then we don't need to keep upgrading the versions of those packages for example. Our clients will be using a minifier anyways, when they're packaging our react lib in their app. Polyfills shouldn't be needed as far as I know - and if our customers really need them they can configure their own bundler to include them. (I might be missing something obvious here of course, but I didn't see an immediate need for Babel/Webpack in this particular project, if we're on TS). |
I've moved the test to TypeScript, and now use |
Yeah, that's something we could look into in a followup PR |
Found that using just |
Ok, but why does it need to be a single file? Does |
Doesn't have to, we can of course create separate JS + .d.ts files. Right now the biggest issue is figuring out why type suggestions have gone out the window. |
This PR converts the project to TypeScript and implements
@seatsio/seatsio-types
0.3.2. Tested in playground as well asseatsio-webapp
with local "link:.." in package.json.