Skip to content
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

[core] Fix some errors when porting demos to TypeScript #12417

Merged
merged 6 commits into from
Aug 6, 2018
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/material-ui/src/Input/Input.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export interface InputProps
multiline?: boolean;
name?: string;
placeholder?: string;
readOnly?:boolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can run yarn prettier to fix the code style.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

required?: boolean;
rows?: string | number;
rowsMax?: string | number;
Expand Down
4 changes: 2 additions & 2 deletions packages/material-ui/src/Popper/Popper.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ export type PopperPlacementType =
export interface PopperProps extends React.HTMLAttributes<HTMLDivElement> {
transition?: boolean;
anchorEl?: null | HTMLElement | ReferenceObject | ((element: HTMLElement) => HTMLElement);
children: (
children: React.ReactElement<any> | ((
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be a node, I believe we should be using React.ReactNode.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

props: {
placement: PopperPlacementType;
TransitionProps?: TransitionProps;
},
) => React.ReactElement<any>;
) => React.ReactElement<any>);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

React.ReactNode most likely.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

container?: PortalProps['container'];
disablePortal?: PortalProps['disablePortal'];
keepMounted?: boolean;
Expand Down
1 change: 1 addition & 0 deletions packages/material-ui/src/RadioGroup/RadioGroup.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export interface RadioGroupProps
name?: string;
onChange?: (event: React.ChangeEvent<{}>, value: string) => void;
value?: string;
ref?;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something is wrong, ref is a native React property. We shouldn't have to declare it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed, my mistake

}

export type RadioGroupClassKey = FormGroupClassKey;
Expand Down