mirror of
https://github.com/google/blockly.git
synced 2026-01-09 10:00:09 +01:00
chore!: delete deprecations for v11. (#7732)
* chore: delete basic deprecations * chore: remove deprecated align enum * chore: remove generator deprecation * chore: format
This commit is contained in:
@@ -6,27 +6,6 @@
|
||||
|
||||
// Former goog.module ID: Blockly.utils.string
|
||||
|
||||
import * as deprecation from './deprecation.js';
|
||||
|
||||
/**
|
||||
* Fast prefix-checker.
|
||||
* Copied from Closure's goog.string.startsWith.
|
||||
*
|
||||
* @param str The string to check.
|
||||
* @param prefix A string to look for at the start of `str`.
|
||||
* @returns True if `str` begins with `prefix`.
|
||||
* @deprecated Use built-in **string.startsWith** instead.
|
||||
*/
|
||||
export function startsWith(str: string, prefix: string): boolean {
|
||||
deprecation.warn(
|
||||
'Blockly.utils.string.startsWith()',
|
||||
'April 2022',
|
||||
'April 2023',
|
||||
'Use built-in string.startsWith',
|
||||
);
|
||||
return str.startsWith(prefix);
|
||||
}
|
||||
|
||||
/**
|
||||
* Given an array of strings, return the length of the shortest one.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user