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

Type-check for <amp-viz-vega> #5008

Merged
merged 3 commits into from
Sep 16, 2016
Merged

Conversation

aghassemi
Copy link
Contributor

No description provided.

@@ -186,7 +202,9 @@ export class AmpVizVega extends AMP.BaseElement {

return parsePromise.then(chartFactory => {
return vsyncFor(this.win).mutatePromise(() => {
dom.removeChildren(this.container_);
const container = /** @type {!Element} */(
dev().assert(this.container_));
Copy link
Member

@erwinmombay erwinmombay Sep 14, 2016

Choose a reason for hiding this comment

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

use dev().assertElement instead, then you can get rid of the type cast annotation

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 (also used assertString for the other case)

@erwinmombay
Copy link
Member

LGTM

@aghassemi aghassemi merged commit 08c3f49 into ampproject:master Sep 16, 2016
mityaha pushed a commit to ooyala/amphtml that referenced this pull request Nov 30, 2016
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.

3 participants