mirror of
https://github.com/google/nomulus.git
synced 2025-05-12 22:38:16 +02:00
Fix deprecated suppresses and Map type in JS
This properly fixes the issue that was suppressed in [] and just started breaking today thanks to [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=213510500
This commit is contained in:
parent
1f80f58336
commit
9bcd5579ef
2 changed files with 5 additions and 9 deletions
|
@ -16,7 +16,6 @@ goog.provide('registry.Session');
|
|||
|
||||
goog.require('goog.json');
|
||||
goog.require('goog.net.XhrIo');
|
||||
goog.require('goog.structs.Map');
|
||||
goog.require('registry.util');
|
||||
|
||||
goog.forwardDeclare('goog.Uri');
|
||||
|
@ -30,7 +29,6 @@ goog.forwardDeclare('goog.Uri');
|
|||
* @param {!registry.Session.ContentType} contentType Payload mode.
|
||||
* @constructor
|
||||
* @template REQUEST, RESPONSE
|
||||
* @suppress {deprecated}
|
||||
*/
|
||||
registry.Session = function(defaultUri, xsrfToken, contentType) {
|
||||
|
||||
|
@ -50,13 +48,13 @@ registry.Session = function(defaultUri, xsrfToken, contentType) {
|
|||
|
||||
/**
|
||||
* XHR request headers.
|
||||
* @private {!goog.structs.Map.<string, string>}
|
||||
* @private {!Map.<string, string>}
|
||||
* @const
|
||||
*/
|
||||
this.headers_ = new goog.structs.Map(
|
||||
'Content-Type', contentType,
|
||||
'X-CSRF-Token', xsrfToken,
|
||||
'X-Requested-With', 'XMLHttpRequest');
|
||||
this.headers_ = new Map([
|
||||
['Content-Type', contentType],
|
||||
['X-CSRF-Token', xsrfToken],
|
||||
['X-Requested-With', 'XMLHttpRequest']]);
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue