-
-
Notifications
You must be signed in to change notification settings - Fork 634
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
[WIP] more types #800
[WIP] more types #800
Conversation
@@ -44,6 +44,14 @@ export interface ComponentLifecycle<P, S> { | |||
componentWillUnmount?: () => void; | |||
} | |||
|
|||
export type SFC<P> = StatelessComponent<P>; |
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.
While it's more verbose. In terms of DX I think that only using StatelessComponent<P>
would be better. I think it will avoid a lot of questions with "What's SFC mean?" for new contributors.
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.
yeah either way is fine for me. SFC
has been in React for a while
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.
@longlho Is this ready for merge or still more work needs to be done?
packages/inferno/src/interface.ts
Outdated
textPath: SVGProps; | ||
tspan: SVGProps; | ||
use: SVGProps; | ||
view: SVGProps; |
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.
what about xlink:href
: SVGProps; ?
@Havunen this is pretty far from ready :( I'm still workin on it. I'll take the WIP tag away once it's ready |
Before submitting a PR please:
npm run build
and check that the build succeeds.PR Template
Objective
Adds more types, fixes #798