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

Fix undefined declrations #1740

Merged
merged 1 commit into from
Feb 2, 2016
Merged

Fix undefined declrations #1740

merged 1 commit into from
Feb 2, 2016

Conversation

dvoytenko
Copy link
Contributor

@erwinmombay
Copy link
Member

@dvoytenko LGTM

@cramforce
Copy link
Member

Resource class has a couple I believe.

Is there a lint check for this by any chance?

@erwinmombay
Copy link
Member

@cramforce there is the unused expressions rule which can catch these, but chai also triggers those right now because of the expect(blah)to.be.blah style. (which is one of the reasons i want to get rid of it)


/** @private {!SizeList|null|undefined} */
this.sizeList_;
this.sizeList_ = undefined;

/** @private {!SizeList|null|undefined} */
Copy link
Member

Choose a reason for hiding this comment

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

couldnt we just assign null as the default then to simplify the types on these? (im ok w/ not changing these if it affects the actual code)

Copy link
Member

Choose a reason for hiding this comment

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

nvm, looks like we explicitly check for undefined in comparisons.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

correct, undefined is a meaningful value here.

@dvoytenko
Copy link
Contributor Author

@cramforce looks like i only missed one.

@dvoytenko
Copy link
Contributor Author

@erwinmombay ptal. let's push this through and then feel free to enable linter.

@erwinmombay
Copy link
Member

@dvoytenko LGTM

dvoytenko added a commit that referenced this pull request Feb 2, 2016
@dvoytenko dvoytenko merged commit 3a172c8 into ampproject:master Feb 2, 2016
@dvoytenko dvoytenko deleted the fixes32 branch February 2, 2016 21:10
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

3 participants