Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
Set the type of getInjectedData to {?}.
Browse files Browse the repository at this point in the history
Reasons:
1) It isn't statically verifiable. Even if you cast the result, it may not be true, as the injected data may change depending on server setup. Thus, you aren't protected from runtime errors so this isn't valuable for type checking.

2) It's not an API we can easily fix. We had to do cr/202516164 to fix local, but there are tons of users of this API.

RELNOTES:n/a

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=203045476
  • Loading branch information
iteriani authored and shicks committed Jul 4, 2018
1 parent b426509 commit 78f06b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions closure/goog/soy/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ goog.soy.Renderer.prototype.handleRender = goog.nullFunction;
/**
* Creates the injectedParams map if necessary and calls the configuration
* service to prepopulate it.
* @return {Object} The injected params.
* @return {?} The injected params.
* @private
*/
goog.soy.Renderer.prototype.getInjectedData_ = function() {
Expand All @@ -335,6 +335,6 @@ goog.soy.InjectedDataSupplier = function() {};
* `goog.soy.Renderer` will treat the returned data as
* immutable. The renderer will call this every time one of its
* {@code render*} methods is called.
* @return {Object} A key-value pair representing the injected data.
* @return {?} A key-value pair representing the injected data.
*/
goog.soy.InjectedDataSupplier.prototype.getData = function() {};

0 comments on commit 78f06b0

Please sign in to comment.