fix!: Update deprecations for the new release. (#6470)

* chore: bump early deprecations to v10

* fixup

* fixup

* chore: remove deprecated properties

* chore: add missing @deprecated tags

* chore: format

* chore: format

* chore: fix import
This commit is contained in:
Beka Westberg
2022-10-03 11:21:52 -07:00
committed by GitHub
parent 12ffd2302c
commit d3447ea565
13 changed files with 34 additions and 216 deletions

View File

@@ -12,8 +12,6 @@
import * as goog from '../closure/goog/goog.js';
goog.declareModuleId('Blockly.Css');
import * as deprecation from './utils/deprecation.js';
/** Has CSS already been injected? */
let injected = false;
@@ -25,20 +23,11 @@ let injected = false;
* @param cssContent Multiline CSS string or an array of single lines of CSS.
* @alias Blockly.Css.register
*/
export function register(cssContent: string|string[]) {
export function register(cssContent: string) {
if (injected) {
throw Error('CSS already injected');
}
if (Array.isArray(cssContent)) {
deprecation.warn(
'Registering CSS by passing an array of strings', 'September 2021',
'September 2022', 'css.register passing a multiline string');
content += '\n' + cssContent.join('\n');
} else {
// Add new cssContent in the global content.
content += '\n' + cssContent;
}
content += '\n' + cssContent;
}
/**