PolymerElements / app-storage

Data-pipes and specialized services
61 stars 47 forks source link

Fix type-checking and property renaming for Closure Compiler. #108

Closed nicksay closed 7 years ago

nicksay commented 7 years ago

Update app-indexeddb-mirror implementation to quote the property names of all MessageEvent.data objects and all postMessage arguments.

This prevents errors likes the following in Closure Compiler with type-checking enabled:

ERROR - Property session never defined on MessageEvent.prototype.data
          this.validateSession(event.data.session).then(function() {
                                          ^^^^^^^

This also prevents Closure Compiler renaming those properties with advanced optimizations, ensuring access by both client and worker.

e111077 commented 7 years ago

ignore failing tests they don't work on master

nicksay commented 7 years ago

Thanks @e111077