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

feat(chips): typescript support #493

Merged
merged 116 commits into from Dec 20, 2018
Merged

Conversation

moog16
Copy link
Contributor

@moog16 moog16 commented Dec 6, 2018

related #48

this.chipElement_ = el;
this.props.initRipple(el);
}
};

get classes() {

Choose a reason for hiding this comment

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

Does this need a return type?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is an implied string return type. If you hover over it in vscode, you can see it being applied. Also we have inferredAny: false. So its built into our linter that this cannot happen.

Choose a reason for hiding this comment

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

Cool!


constructor(props) {
export default class ChipSet extends React.Component<ChipSetProps, ChipSetState> {
checkmarkWidth_ = 0;

Choose a reason for hiding this comment

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

Same thing here, should this be marked private?

};

export class Chip extends React.Component<ChipProps, ChipState> {
chipElement_: HTMLDivElement | null = null;

Choose a reason for hiding this comment

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

Should these be declared private?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is being used in the tests and cannot be private :(

Choose a reason for hiding this comment

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

Ah, ok


computeBoundingRect = (chipElement) => {
computeBoundingRect = (chipElement: HTMLDivElement) => {

Choose a reason for hiding this comment

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

Should this have a return type?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

implied type

screen shot 2018-12-18 at 17 22 00

@moog16
Copy link
Contributor Author

moog16 commented Dec 19, 2018

@rlfriedman updated!

@moog16 moog16 changed the base branch from fix/coverage-typescript to feat/two-typescript December 20, 2018 00:53
@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

@moog16 moog16 merged commit aad8c62 into feat/two-typescript Dec 20, 2018
@moog16 moog16 deleted the feat/typescript-chips branch December 20, 2018 22:50
moog16 pushed a commit that referenced this pull request Dec 27, 2018
moog16 pushed a commit that referenced this pull request Dec 28, 2018
moog16 pushed a commit that referenced this pull request Dec 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants