mirror of
https://github.com/google/blockly.git
synced 2026-01-07 09:00:11 +01:00
* chore(deps): Bump prettier from 2.8.8 to 3.0.0 Bumps [prettier](https://github.com/prettier/prettier) from 2.8.8 to 3.0.0. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.8.8...3.0.0) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * chore: Reformat using Prettier v3.0 defaults The main change is to add trailing commas to the last line of block-formatted function calls. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Christopher Allen <cpcallen+git@google.com>
39 lines
1.0 KiB
TypeScript
39 lines
1.0 KiB
TypeScript
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import * as goog from '../../closure/goog/goog.js';
|
|
goog.declareModuleId('Blockly.utils.deprecation');
|
|
|
|
/**
|
|
* Warn developers that a function or property is deprecated.
|
|
*
|
|
* @param name The name of the function or property.
|
|
* @param deprecationDate The date of deprecation. Prefer 'version n.0.0'
|
|
* format, and fall back to 'month yyyy' or 'quarter yyyy' format.
|
|
* @param deletionDate The date of deletion. Prefer 'version n.0.0'
|
|
* format, and fall back to 'month yyyy' or 'quarter yyyy' format.
|
|
* @param opt_use The name of a function or property to use instead, if any.
|
|
* @internal
|
|
*/
|
|
export function warn(
|
|
name: string,
|
|
deprecationDate: string,
|
|
deletionDate: string,
|
|
opt_use?: string,
|
|
) {
|
|
let msg =
|
|
name +
|
|
' was deprecated in ' +
|
|
deprecationDate +
|
|
' and will be deleted in ' +
|
|
deletionDate +
|
|
'.';
|
|
if (opt_use) {
|
|
msg += '\nUse ' + opt_use + ' instead.';
|
|
}
|
|
console.warn(msg);
|
|
}
|