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

JS Compilation warnings #35

Open
jonathancross opened this issue Nov 7, 2017 · 0 comments
Open

JS Compilation warnings #35

jonathancross opened this issue Nov 7, 2017 · 0 comments

Comments

@jonathancross
Copy link
Owner

Per:

curl -d 'code_url=https://raw.githubusercontent.com/jonathancross/pics.jonathancross.com/master/jcdsee/jcdsee.js' -d 'output_info=warnings' -d 'compilation_level=ADVANCED_OPTIMIZATIONS' https://closure-compiler.appspot.com/compile
https://raw.githubusercontent.com/jonathancross/pics.jonathancross.com/master/jcdsee/jcdsee.js:171: WARNING - inconsistent return type
found   : Element
required: HTMLUListElement
  return slideShowButtons;
         ^^^^^^^^^^^^^^^^
https://raw.githubusercontent.com/jonathancross/pics.jonathancross.com/master/jcdsee/jcdsee.js:187: WARNING - inconsistent return type
found   : Element
required: HTMLButtonElement
  return button;
         ^^^^^^
https://raw.githubusercontent.com/jonathancross/pics.jonathancross.com/master/jcdsee/jcdsee.js:257: WARNING - element appendChild does not exist on this enum
  this.contentContainer_.appendChild(this.nodes_.domFragment);
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
https://raw.githubusercontent.com/jonathancross/pics.jonathancross.com/master/jcdsee/jcdsee.js:326: WARNING - Property fileName never defined on Image
  this.nodes_.fileNameEl.textContent = selectedImage.fileName;
                                                     ^^^^^^^^
https://raw.githubusercontent.com/jonathancross/pics.jonathancross.com/master/jcdsee/jcdsee.js:336: WARNING - Property href never defined on Image
  this.nodes_.imageEl.src = selectedImage.href;
                                          ^^^^
https://raw.githubusercontent.com/jonathancross/pics.jonathancross.com/master/jcdsee/jcdsee.js:352: WARNING - actual parameter 1 of jcd.SlideShow.prototype.loadImage does not match formal parameter
found   : Image
required: jcd.File
    this.loadImage(this.imageManager.getSelectedImage());
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
https://raw.githubusercontent.com/jonathancross/pics.jonathancross.com/master/jcdsee/jcdsee.js:377: WARNING - actual parameter 1 of jcd.SlideShow.prototype.loadImage does not match formal parameter
found   : Image
required: jcd.File
  this.loadImage(this.imageManager.getNextImage());
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
https://raw.githubusercontent.com/jonathancross/pics.jonathancross.com/master/jcdsee/jcdsee.js:386: WARNING - actual parameter 1 of jcd.SlideShow.prototype.loadImage does not match formal parameter
found   : Image
required: jcd.File
  this.loadImage(this.imageManager.getPreviousImage());
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
https://raw.githubusercontent.com/jonathancross/pics.jonathancross.com/master/jcdsee/jcdsee.js:410: WARNING - actual parameter 1 of jcd.SlideShow.prototype.loadImage does not match formal parameter
found   : Image
required: jcd.File
  this.loadImage(this.imageManager.getSelectedImage());
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
https://raw.githubusercontent.com/jonathancross/pics.jonathancross.com/master/jcdsee/jcdsee.js:438: WARNING - Function jcd.FileList.prototype.getFiles: called with 1 argument(s). Function requires at least 0 argument(s) and no more than 0 argument(s).
  this.files = this.getFiles(this.container);
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
https://raw.githubusercontent.com/jonathancross/pics.jonathancross.com/master/jcdsee/jcdsee.js:488: WARNING - inconsistent return type
found   : number
required: Image
  return this.selectedIndex_;
         ^^^^^^^^^^^^^^^^^^^
https://raw.githubusercontent.com/jonathancross/pics.jonathancross.com/master/jcdsee/jcdsee.js:528: WARNING - Property updateCounter never defined on jcd.ImageManager
  this.updateCounter();
       ^^^^^^^^^^^^^
https://raw.githubusercontent.com/jonathancross/pics.jonathancross.com/master/jcdsee/jcdsee.js:609: WARNING - assignment to property selectedImage_ of jcd.ImageManager
found   : jcd.File
required: Image
        this.selectedImage_ = file;
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
https://raw.githubusercontent.com/jonathancross/pics.jonathancross.com/master/jcdsee/jcdsee.js:676: WARNING - assignment to property bind of Function.prototype
found   : function(this:Function, Object, ...*): Function
required: function(this:Function, (Object|null|undefined), ...*): Function
  Function.prototype.bind = function (oThis) {
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
https://raw.githubusercontent.com/jonathancross/pics.jonathancross.com/master/jcdsee/jcdsee.js:676: WARNING - variable Function.prototype.bind redefined with type function(this:Function, Object, ...*): Function, original definition at http://closure-compiler.appspot.com/externs.js:2192 with type function(this:Function, (Object|null|undefined), ...*): Function
  Function.prototype.bind = function (oThis) {
  ^^^^^^^^^^^^^^^^^^^^^^^
https://raw.githubusercontent.com/jonathancross/pics.jonathancross.com/master/jcdsee/jcdsee.js:692: WARNING - cannot instantiate non-constructor
    fBound.prototype = new fNOP();
                       ^^^^^^^^^^
https://raw.githubusercontent.com/jonathancross/pics.jonathancross.com/master/jcdsee/jcdsee.js:709: WARNING - Bad type annotation. expected closing } See https://github.com/google/closure-compiler/wiki/Bad-Type-Annotation for more information.
 * @param {!Function()} func Callback.
                    ^
https://raw.githubusercontent.com/jonathancross/pics.jonathancross.com/master/jcdsee/jcdsee.js:709: WARNING - Bad type annotation. expecting a variable name in a @param tag. See https://github.com/google/closure-compiler/wiki/Bad-Type-Annotation for more information.
 * @param {!Function()} func Callback.
                    ^
https://raw.githubusercontent.com/jonathancross/pics.jonathancross.com/master/jcdsee/jcdsee.js:813: WARNING - assignment to property nextImgEl_ of jcd.Page
found   : (Element|null)
required: Image
  this.nextImgEl_ = document.getElementById(this.elementIds_.NEXT);
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
https://raw.githubusercontent.com/jonathancross/pics.jonathancross.com/master/jcdsee/jcdsee.js:814: WARNING - assignment to property prevImgEl_ of jcd.Page
found   : (Element|null)
required: Image
  this.prevImgEl_ = document.getElementById(this.elementIds_.PREV);
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
https://raw.githubusercontent.com/jonathancross/pics.jonathancross.com/master/jcdsee/jcdsee.js:858: WARNING - assignment to property fileListContainer_ of jcd.Page
found   : (Element|null)
required: Element
  this.fileListContainer_ = document.getElementById(this.elementIds_.FILES);
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
https://raw.githubusercontent.com/jonathancross/pics.jonathancross.com/master/jcdsee/jcdsee.js:872: WARNING - actual parameter 1 of jcd.utils.addEvent does not match formal parameter
found   : Window
required: Element
    jcd.utils.addEvent(window, 'load', this.cacheNextPrev.bind(this));
                       ^^^^^^
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

No branches or pull requests

1 participant