Ensure generated bundles contain a single license header instead of repeating the same notice across bundled modules. Normalize all copyright years to 2016 and remove duplicate license headers from generated bundles. This reduces the final bundle size while preserving license information in the distributed artifacts.
60 lines
1.6 KiB
JavaScript
60 lines
1.6 KiB
JavaScript
/*! @license
|
|
* Shaka Player
|
|
* Copyright 2016 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/**
|
|
* @fileoverview Externs for Map getOrInsert/getOrInsertComputed methods
|
|
*
|
|
* @externs
|
|
*/
|
|
|
|
/**
|
|
* Returns the value for the given key if present; otherwise inserts
|
|
* the default value, and returns that.
|
|
* @param {K} key
|
|
* @param {V} defaultValue
|
|
* @return {V}
|
|
* @this {Map<K, V>}
|
|
* @template K, V
|
|
*/
|
|
// eslint-disable-next-line no-extend-native
|
|
Map.prototype.getOrInsert = function(key, defaultValue) {};
|
|
|
|
/**
|
|
* Returns the value for the given key if present; otherwise calls
|
|
* the callback with the key, inserts the returned value, and returns that.
|
|
* @param {K} key
|
|
* @param {function(K): V} callbackFunction
|
|
* @return {V}
|
|
* @this {Map<K, V>}
|
|
* @template K, V
|
|
*/
|
|
// eslint-disable-next-line no-extend-native
|
|
Map.prototype.getOrInsertComputed = function(key, callbackFunction) {};
|
|
|
|
/**
|
|
* Returns the value for the given key if present; otherwise inserts
|
|
* the default value, and returns that.
|
|
* @param {K} key
|
|
* @param {V} defaultValue
|
|
* @return {V}
|
|
* @this {WeakMap<K, V>}
|
|
* @template K, V
|
|
*/
|
|
// eslint-disable-next-line no-extend-native
|
|
WeakMap.prototype.getOrInsert = function(key, defaultValue) {};
|
|
|
|
/**
|
|
* Returns the value for the given key if present; otherwise calls
|
|
* the callback with the key, inserts the returned value, and returns that.
|
|
* @param {K} key
|
|
* @param {function(K): V} callbackFunction
|
|
* @return {V}
|
|
* @this {WeakMap<K, V>}
|
|
* @template K, V
|
|
*/
|
|
// eslint-disable-next-line no-extend-native
|
|
WeakMap.prototype.getOrInsertComputed = function(key, callbackFunction) {};
|