Get rid of google charts errors.

This commit is contained in:
Ian Gulliver
2016-01-08 12:42:29 -08:00
parent f95d16fa6c
commit 711a36fd3a
2 changed files with 15 additions and 0 deletions

14
static/externs.js Normal file
View File

@@ -0,0 +1,14 @@
/* Externs that we don't get from real sources are here */
google.charts = {};
/**
* @param {function()} callback
*/
google.charts.setOnLoadCallback = function(callback) {};
/**
* @param {Node} container
* @constructor
*/
google.visualization.Timeline = function(container) {};

View File

@@ -10,6 +10,7 @@ curl \
--data warning_level=verbose \
--data externs_url=https://www.cosmopolite.org/externs/cosmopolite.js \
--data externs_url=https://raw.githubusercontent.com/google/closure-compiler/master/contrib/externs/google_visualization_api.js \
--data-urlencode "js_externs@externs.js" \
--data-urlencode "js_code@babystats.js" \
http://closure-compiler.appspot.com/compile | ./prettyprint.py