-
-
Notifications
You must be signed in to change notification settings - Fork 227
Conversation
split typescript types into more interfaces that can be used separately in app code
Thanks, is there any way to keep Also, I think it would make sense to export the |
typings/react-popper.d.ts
Outdated
} | ||
export class Reference extends React.Component<ReferenceProps, {}> { } | ||
|
||
interface ArrowProps extends RefProps { |
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.
PopperArrowProps
instead? So we keep all the Popper related types under the same namespace?
These types may be useful to consumers to better type their own code. This commit aims to get on pair with #153
I created this PR to mimic what you have done here. I already renamed some types to reflect my comments in your PR, please let me know if it makes sense. |
@FezVrasta not possible to prevent symbols in the .d.ts file from being exported, but i replaced |
typings/react-popper.d.ts
Outdated
interface PopperChildrenProps { | ||
arrowProps: PopperArrowProps; | ||
outOfBoundaries: boolean | null; | ||
placement?: PopperJS.Placement; |
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.
@FezVrasta do we know if this field will always be defined? as in, should it be marked optional or not? my suspicion is that it's always defined, that popper.js always computes a valid placement
regardless of the given option value
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.
Yes actually I think it's always going to be defined, I'm not sure why I marked it as optional.
These types may be useful to consumers to better type their own code. This commit aims to get on pair with #153
These types may be useful to consumers to better type their own code. This commit aims to get on pair with #153
These types may be useful to consumers to better type their own code. This commit aims to get on pair with #153
These types may be useful to consumers to better type their own code. This commit aims to get on pair with #153
These types may be useful to consumers to better type their own code. This commit aims to get on pair with #153
These types may be useful to consumers to better type their own code. This commit aims to get on pair with #153
fixes #152
split typescript types into more interfaces that can be used separately in app code