-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Refactor/client types #2025
Refactor/client types #2025
Conversation
7d42ed5
to
f12cad7
Compare
@Koslun these changes should fix the TS errors and work in both TS/Flow |
@Awk34 Take it we're skipping more specific typings from definition files that would only apply to TS to avoid having a lot of ejs if's and thus more maintainable templates? Especially since many will be useless with Angular 2 with more maintainable templates also being a plus when we're upgrading. |
@Koslun I'm just trying to fix all the TS errors that people are seeing when building the app for the first time. I also want to try to keep any type definitions able to be used with both Flow & TS. Is that reasonable? Also, is this good to merge? |
As I said. Appreciate that restricting type definitions to what works in both flow and TS enables us to avoid having either an extra template file or just a lot of if-statements for when it's TS. Also realize that most of TS-specific logic will be useless with Angular 1 anyway. With Angular 2 using external type definitions will also be needed to a much lesser extent as the Angular 2 libraries are already written in TS. So figure that fully typed TS and Flow code will be a lot more similar then. So based on that premise I think it's fully reasonable and like the strategy. If anything I'm more skeptical of Flow itself as it does not currently support definition files and I know no libraries written with Flow, would think React is but cannot find anything to indicate that. Can however somewhat understand wanting to rather work with Babel and thus using Flow with that. And as it's already implemented in this generator I can see the benefits of it.
Pretty much, seems to work on my end. Might want to fix two final errors:
Looking into it now. |
Yeah, React uses Flow. |
What I don't then get is why they don't clearly state that here: https://facebook.github.io/react/docs/language-tooling.html#flow , or even here: https://flowtype.org/docs/react.html#_. Feels like a pretty meaningful feature and a strong insentive to use Flow when you develop React applications. Not mentioned on React's wikipedia page either. |
@Koslun ¯_(ツ)_/¯ They have TypeScript typings, as well as test against TypeScript, CoffeeScript |
Shouldn't have changed any behavior just more explicitly sending in |
@@ -100,7 +100,7 @@ export function AuthService($location, $http, $cookies, $q, appConfig, Util, Use | |||
/** | |||
* Gets all available info on a user | |||
* | |||
* @param {Function} [callback] - funciton(user) | |||
* @param {Function} [callback] - optional, function(user) |
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.
"optional, " is redundant here
Think the fail is unrelated, tried scaling back the changes and getting the same errors when running the tests locally. |
Sequelize likes to 💩 itself quite often |
No description provided.