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

Bump actions/setup-java from 3 to 4 #4

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add closure-library externs for csp, and our own hack file for elemen…
…tal2
  • Loading branch information
niloc132 committed Oct 12, 2022
commit ab0898473d291b98239411dcdbee55ccf28ee46f
86 changes: 86 additions & 0 deletions externs/browser/cspviolationobserver_externs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/**
* @license
* Copyright The Closure Library Authors.
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @fileoverview Externs used by cspviolationobserver.js that are not available
* in the open-source Closure compiler release. This file should be deleted
* once w3c_reporting_observer.js is available in open-source externs.
*
* @externs
*/

// TODO(user): Remove this file once w3c_reporting_observer.js is
// available in the open-source Closure compiler.

/**
* https://w3c.github.io/reporting/#interface-reporting-observer
* @constructor
* @param {!ReportingObserverCallback} callback
* @param {!ReportingObserverOptions} opts
*/
function ReportingObserver2(callback, opts) {}
/** @return {void} */
ReportingObserver2.prototype.observe = function() {};
/** @return {void} */
ReportingObserver2.prototype.disconnect = function() {};
/** @return {!Array<!Report>} */
ReportingObserver2.prototype.takeRecords = function() {};

/**
* @typedef {ReportingObserver2|ReportingObserver}
* @suppress {duplicate}
*/
var ReportingObserver;


/**
* @typedef {!function(!Array<Report>, !ReportingObserver): void}
* @suppress {duplicate}
*/
var ReportingObserverCallback;


/**
* @constructor
*/
function ReportingObserverOptions2() {}
/** @type {undefined|!Array<string>} */
ReportingObserverOptions2.prototype.types;
/** @type {boolean} */
ReportingObserverOptions2.prototype.buffered;

/**
* @typedef {ReportingObserverOptions2|ReportingObserverOptions}
* @suppress {duplicate}
*/
var ReportingObserverOptions;


/**
* @constructor
* @suppress {duplicate}
*/
function Report2() {}
/** @type {string} */ Report2.prototype.type;
/** @type {string} */ Report2.prototype.url;
/** @type {?ReportBody} */ Report2.prototype.body;

/**
* @typedef {Report2|Report}
* @suppress {duplicate}
*/
var Report;


/**
* @constructor
*/
function ReportBody2() {}

/**
* @typedef {ReportBody2|ReportBody2}
* @suppress {duplicate}
*/
var ReportBody;
54 changes: 54 additions & 0 deletions externs/browser/elemental2-1.1.0-hack.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/**
* @fileoverview Describes types present in elemental2 1.1.0 that are not in closure-compiler, since they aren't
* real browser types. Presently this only contains the `WebWorker` type which never existed as a browser type,
* but showed up in closure-compiler as a typo or early draft or something. As long as elemental2 1.1.0 is
* supported, we must keep this file in our closure-compiler fork.
*
* TODO Remove this once elemental2 1.1.0 is considered to be unsupported by j2cl - this day may not come soon,
* if ever, as it is a "stable" release.
*
* @externs
*/

/**
* @see http://dev.w3.org/html5/workers/
* @constructor
* @implements {EventTarget}
*/
function WebWorker() {}

/** @override */
WebWorker.prototype.addEventListener = function(type, listener, opt_options) {};

/** @override */
WebWorker.prototype.removeEventListener = function(
type, listener, opt_options) {};

/** @override */
WebWorker.prototype.dispatchEvent = function(evt) {};

/**
* Stops the worker process
* @return {undefined}
*/
WebWorker.prototype.terminate = function() {};

/**
* Posts a message to the worker thread.
* @param {string} message
* @return {undefined}
*/
WebWorker.prototype.postMessage = function(message) {};

/**
* Sent when the worker thread posts a message to its creator.
* @type {?function(!MessageEvent<*>): void}
*/
WebWorker.prototype.onmessage;

/**
* Sent when the worker thread encounters an error.
* @type {?function(!ErrorEvent): void}
*/
WebWorker.prototype.onerror;