Skip to content

Commit 35fa315

Browse files
authored
Change Object to object in type decl (ampproject#39095)
bypassing checks to fix the lint issues
1 parent 75eed00 commit 35fa315

File tree

67 files changed

+101
-100
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+101
-100
lines changed

Diff for: 3p/iframe-messaging-client.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ export class IframeMessagingClient {
219219

220220
/**
221221
* @param {string} messageType
222-
* @param {Object} message
222+
* @param {object} message
223223
*/
224224
fireObservable_(messageType, message) {
225225
if (messageType in this.observableFor_) {

Diff for: 3p/recaptcha.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ function initializeIframeMessagingClient(win, grecaptcha, dataObject) {
142142
*
143143
* @param {Window} win
144144
* @param {*} grecaptcha
145-
* @param {Object} data
145+
* @param {object} data
146146
*/
147147
function actionTypeHandler(win, grecaptcha, data) {
148148
doesOriginDomainMatchIframeSrc(win, data)
@@ -183,7 +183,7 @@ function actionTypeHandler(win, grecaptcha, data) {
183183
* Function to verify our origin domain from the
184184
* parent window.
185185
* @param {Window} win
186-
* @param {Object} data
186+
* @param {object} data
187187
* @return {!Promise}
188188
*/
189189
export function doesOriginDomainMatchIframeSrc(win, data) {

Diff for: 3p/viqeoplayer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {loadScript} from './3p';
77

88
/**
99
* @param {Window} global
10-
* @param {Object} VIQEO
10+
* @param {object} VIQEO
1111
* @private
1212
*/
1313
function viqeoPlayerInitLoaded(global, VIQEO) {

Diff for: ads/_a4a-config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ let a4aRegistry;
1717

1818
/**
1919
* Returns the a4a registry map
20-
* @return {Object}
20+
* @return {object}
2121
*/
2222
export function getA4ARegistry() {
2323
if (!a4aRegistry) {

Diff for: ads/google/a4a/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export let NameframeExperimentConfig;
9898
*/
9999
export const TRUNCATION_PARAM = {name: 'trunc', value: '1'};
100100

101-
/** @const {Object} */
101+
/** @const {object} */
102102
const CDN_PROXY_REGEXP =
103103
/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org((\/.*)|($))+/;
104104

Diff for: ads/google/ima/ima-video.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1206,7 +1206,7 @@ export function toggleMuted(video, muted) {
12061206
}
12071207

12081208
/**
1209-
* @param {Object} global
1209+
* @param {object} global
12101210
*/
12111211
function exitFullscreen(global) {
12121212
// The video is currently in fullscreen mode
@@ -1221,7 +1221,7 @@ function exitFullscreen(global) {
12211221
}
12221222

12231223
/**
1224-
* @param {Object} global
1224+
* @param {object} global
12251225
*/
12261226
function enterFullscreen(global) {
12271227
// Try to enter fullscreen mode in the browser
@@ -1250,7 +1250,7 @@ function enterFullscreen(global) {
12501250
}
12511251

12521252
/**
1253-
* @param {Object} global
1253+
* @param {object} global
12541254
*/
12551255
function toggleFullscreen(global) {
12561256
if (fullscreen) {
@@ -1262,7 +1262,7 @@ function toggleFullscreen(global) {
12621262

12631263
/**
12641264
* Called when the fullscreen mode of the browser or content player changes.
1265-
* @param {Object} global
1265+
* @param {object} global
12661266
*/
12671267
function onFullscreenChange(global) {
12681268
if (fullscreen) {
@@ -1643,7 +1643,7 @@ export function setHideControlsTimeoutForTesting(newTimeout) {
16431643
}
16441644

16451645
/**
1646-
* @param {Object} newContext
1646+
* @param {object} newContext
16471647
* @visibleForTesting
16481648
*/
16491649
export function setContextForTesting(newContext) {

Diff for: ads/vendors/admixer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {tryParseJson} from '#core/types/object/json';
99
export function admixer(global, data) {
1010
validateData(data, ['zone'], ['sizes']);
1111
/**
12-
* @type {Object}
12+
* @type {object}
1313
*/
1414
const payload = {
1515
imps: [],

Diff for: ads/vendors/adocean.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function isFalseString(str) {
2525
/**
2626
* @param {string} mode
2727
* @param {!Window} global
28-
* @param {Object} consent
28+
* @param {object} consent
2929
*/
3030
function setupAdoConfig(mode, global, consent) {
3131
if (global['ado']) {
@@ -208,7 +208,7 @@ function requestCodes(masterId, data, global, callback) {
208208
class AdoBuffer {
209209
/**
210210
*
211-
* @param {Object} container
211+
* @param {object} container
212212
* @param {!Window} global
213213
*/
214214
constructor(container, global) {

Diff for: ads/vendors/feedad.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,30 @@ import {setStyle} from '#core/dom/style';
2626
*/
2727

2828
/**
29-
* @typedef {Object} FeedAdAsync
29+
* @typedef {object} FeedAdAsync
3030
* @private
3131
*
3232
* @property {FeedAd} [sdk]
3333
* @property {!Function[]} cmd
3434
*/
3535

3636
/**
37-
* @typedef {Object} FeedAd
37+
* @typedef {object} FeedAd
3838
* @private
3939
*
4040
* @property {function(string)} init
4141
* @property {function(string):Promise<FeedAdResponse>} requestAd
4242
*/
4343

4444
/**
45-
* @typedef {Object} FeedAdResponse
45+
* @typedef {object} FeedAdResponse
4646
* @private
4747
*
4848
* @property {function():HTMLElement} createAdContainer()
4949
*/
5050

5151
/**
52-
* @typedef {Object} FeedAdData
52+
* @typedef {object} FeedAdData
5353
* @private
5454
*
5555
* @property {string} clientToken

Diff for: ads/vendors/ssp.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import {parseJson} from '#core/types/object/json';
2828
* @param {!Array.<!Object>} array
2929
* @param {!Function} iteratee
3030
*
31-
* @return {Object}
31+
* @return {object}
3232
*/
3333
export function keyBy(array, iteratee) {
3434
return array.reduce(
@@ -53,7 +53,7 @@ export function runWhenFetchingSettled(fetchingSSPs, cb) {
5353
/**
5454
* @param {!Element} element
5555
* @param {boolean} center
56-
* @param {Object} dimensions
56+
* @param {object} dimensions
5757
*/
5858
export function handlePosition(element, center, dimensions) {
5959
const styles = {

Diff for: build-system/babel-config/import-resolver.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function readJsconfigPaths() {
4444
/**
4545
* Remap external modules that rely on React if building for Preact.
4646
* @param {'preact' | 'react'} buildFor
47-
* @return {Object}
47+
* @return {object}
4848
*/
4949
function moduleAliases(buildFor) {
5050
if (buildFor === 'react') {
@@ -59,7 +59,7 @@ function moduleAliases(buildFor) {
5959
/**
6060
* Import map configuration.
6161
* @param {'preact' | 'react' | null} buildFor determines whether to include preact or react aliases or neither. By default, uses preact aliases (in addition to jsconfig paths).
62-
* @return {Object}
62+
* @return {object}
6363
*/
6464
function getImportResolver(buildFor = 'preact') {
6565
return {

Diff for: build-system/babel-config/react-config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const {getUnminifiedConfig} = require('./unminified-config');
66

77
/**
88
* @param {!Object} config
9-
* @return {Object}
9+
* @return {object}
1010
*/
1111
function mergeReactBabelConfig(config) {
1212
const rootDir = path.join(__dirname, '../../');

Diff for: build-system/babel-plugins/babel-plugin-amp-mode-transformer/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* Changes the values of getMode().test, getMode().localDev to false
55
* and getMode().localDev to true.
6-
* @param {Object} babelTypes
6+
* @param {object} babelTypes
77
*/
88
const {dirname, join, relative, resolve} = require('path').posix;
99

Diff for: build-system/babel-plugins/babel-plugin-nomodule-loader/define-template.js

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
* An async module loader similar to define() in AMD.
1313
* Our implementation varies in that it can be compiled down to a minimal form
1414
* based on the module's needs, rather than bundling a full implementation.
15+
* @param defineCallback
1516
*/
1617
(function defineish(defineCallback) {
1718
// self.BENTO maps module names to callbacks to execute with their contents.

Diff for: build-system/babel-plugins/babel-plugin-nomodule-loader/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module.exports = function (babel) {
2626
pathToModuleName(posix.join(posix.dirname(filename), source));
2727

2828
/**
29-
* @param {Object} replacements
29+
* @param {object} replacements
3030
* @return {babel.Node}
3131
*/
3232
function buildWrapper(replacements) {

Diff for: build-system/common/esbuild-babel.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function getEsbuildBabelPlugin(
4646
* @param {string} filename
4747
* @param {string} contents
4848
* @param {string} hash
49-
* @param {Object} babelOptions
49+
* @param {object} babelOptions
5050
* @return {!Promise<!CacheMessageDef>}
5151
*/
5252
async function transformContents(filename, contents, hash, babelOptions) {

Diff for: build-system/common/preact-prop-names.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
*/
77

88
/**
9-
* @param {Object} obj
10-
* @return {Object}
9+
* @param {object} obj
10+
* @return {object}
1111
*/
1212
function objectFlip(obj) {
1313
const ret = {};

Diff for: build-system/common/update-session-issues/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function parseYyyyMmDd(yyyyMmDd, hours = 0, minutes = 0) {
8484

8585
/**
8686
* @param {string} url
87-
* @param {Object} options
87+
* @param {object} options
8888
* @param {string=} data
8989
* @return {!Promise<{res: *, body: string}>}
9090
*/
@@ -165,7 +165,7 @@ async function postGithub(token, url, data) {
165165
/**
166166
* @param {string} token
167167
* @param {string} repo
168-
* @param {Object} data
168+
* @param {object} data
169169
* @return {Promise<Object>}
170170
*/
171171
function postGithubIssue(token, repo, data) {
@@ -299,7 +299,7 @@ const timeZ = (yyyy, mm, dd, hours, minutes) =>
299299

300300
/**
301301
* @param {TemplateDef} template
302-
* @return {Object}
302+
* @return {object}
303303
*/
304304
function getNextIssueData(template) {
305305
const {

Diff for: build-system/compile/helpers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const {VERSION: internalRuntimeVersion} = require('./internal-version');
77
* Computes the base url for sourcemaps. Custom sourcemap URLs have placeholder
88
* {version} that should be replaced with the actual version. Also, ensures
99
* that a trailing slash exists.
10-
* @param {Object} options
10+
* @param {object} options
1111
* @return {string}
1212
*/
1313
function getSourceRoot(options) {

Diff for: build-system/eslint-rules/enums.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
*
3737
* @return {!Object}
3838
*/
39-
// eslint-disable-next-line
39+
4040
module.exports = function create(context) {
4141
const renames = [];
4242
/**

Diff for: build-system/externs/amp.extern.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ let WebAnimationTimingDef;
995995
* specified as properties with the name in the format of `--varName`.
996996
*
997997
* @mixin
998-
* @typedef {Object}
998+
* @typedef {object}
999999
*/
10001000
let WebAnimationVarsDef;
10011001

Diff for: build-system/release-tagger/label-pull-requests.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const labelConfig = {
1616
* @param {string} head
1717
* @param {string} base
1818
* @param {string} channel
19-
* @param {Object} api
19+
* @param {object} api
2020
* @return {Promise<Object>}
2121
*/
2222
async function _setup(head, base, channel, api) {

Diff for: build-system/release-tagger/utils.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ const {Octokit} = require('@octokit/rest');
1212
*/
1313
class GitHubApi {
1414
/**
15-
* @param {Object} octokitRest
16-
* @param {Object} octokitGraphQl
15+
* @param {object} octokitRest
16+
* @param {object} octokitGraphQl
1717
*/
1818
constructor(octokitRest, octokitGraphQl) {
1919
this.octokit = octokitRest
@@ -154,7 +154,7 @@ class GitHubApi {
154154
/**
155155
* Update a GitHub release
156156
* @param {string} id
157-
* @param {Object} changes
157+
* @param {object} changes
158158
* @return {Promise<Object>}
159159
*/
160160
async updateRelease(id, changes) {

Diff for: build-system/server/routes/a4a-envelopes.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ function getInaboxUrl(req, extraExperiment) {
121121
* If the URL does not return text, returns null.
122122
* @param {string} template
123123
* @param {string} url
124-
* @param {Object} query
124+
* @param {object} query
125125
* @return {!Promise<?string>}
126126
*/
127127
async function requestFromUrl(template, url, query) {
@@ -139,7 +139,7 @@ async function requestFromUrl(template, url, query) {
139139
* Fill out a template with some common variables.
140140
* @param {string} template
141141
* @param {string} url
142-
* @param {Object} query
142+
* @param {object} query
143143
* @param {string=} body
144144
* @return {string}
145145
*/

Diff for: build-system/task-runner/amp-task-runner.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ function createTask(
235235

236236
/**
237237
* Validates usage by examining task and flag invocation.
238-
* @param {Object} task
238+
* @param {object} task
239239
* @param {string} taskName
240240
* @param {TaskFuncDef} taskFunc
241241
*/

Diff for: build-system/tasks/3p-vendor-helpers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ async function doBuild3pVendor(jsBundles, name, options) {
7777

7878
/**
7979
* Generate bundles for all 3p vendors to be built.
80-
* @return {Object}
80+
* @return {object}
8181
*/
8282
function generateBundles() {
8383
const bundles = {};

Diff for: build-system/tasks/build-story-localization.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ async function getLanguageStrings() {
5555
/**
5656
* Retrieves the fallback language codes for each current locale
5757
* and merges any strings from the fallback language.
58-
* @param {Object} languages
58+
* @param {object} languages
5959
*/
6060
function mergeFallbacks(languages) {
6161
for (const langKey in languages) {

Diff for: build-system/tasks/css/jsify-css-sync.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ let syncTransformer;
1111
* @param {string} cssStr the css text to transform
1212
* @param {!Object=} opt_cssnano cssnano options
1313
* @param {!Object=} opt_filename the filename of the file being transformed. Used for sourcemaps generation.
14-
* @return {Object} The transformation result
14+
* @return {object} The transformation result
1515
*/
1616
function transformCssSync(cssStr, opt_cssnano, opt_filename) {
1717
if (!syncTransformer) {

0 commit comments

Comments
 (0)