From cbf8b4b18d09af292a8f3382e15cbe58c32d71f5 Mon Sep 17 00:00:00 2001 From: Sam El-Husseini Date: Tue, 8 Oct 2019 11:12:29 -0700 Subject: [PATCH] Add setLocale to the Blockly typescript definition file. (#3197) --- gulpfile.js | 1 - typings/blockly.d.ts | 14 +++++++------- typings/parts/blockly-interfaces.d.ts | 7 +++++++ typings/parts/goog-closure.d.ts | 6 ------ 4 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 typings/parts/goog-closure.d.ts diff --git a/gulpfile.js b/gulpfile.js index aee799e8b..f4959161e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -369,7 +369,6 @@ gulp.task('typings', function (cb) { const srcs = [ 'typings/parts/blockly-header.d.ts', 'typings/parts/blockly-interfaces.d.ts', - 'typings/parts/goog-closure.d.ts', `${tmpDir}/core/**`, `${tmpDir}/core/components/**`, `${tmpDir}/core/components/tree/**`, diff --git a/typings/blockly.d.ts b/typings/blockly.d.ts index 2043e6fd2..a8136d568 100644 --- a/typings/blockly.d.ts +++ b/typings/blockly.d.ts @@ -79,13 +79,13 @@ declare module Blockly { viewWidth: number; } -} - -declare namespace goog { - function require(name: string): void; - function provide(name: string): void; - function inherits(child: any, parent: any): void; - function isFunction(f: any): boolean; + /** + * Set the Blockly locale. + * Note: this method is only available in the npm release of Blockly. + * @param {!Object} msg An object of Blockly message strings in the desired + * language. + */ + function setLocale(msg: {[key: string]: string;}): void; } diff --git a/typings/parts/blockly-interfaces.d.ts b/typings/parts/blockly-interfaces.d.ts index 5241054c8..a7a7879bb 100644 --- a/typings/parts/blockly-interfaces.d.ts +++ b/typings/parts/blockly-interfaces.d.ts @@ -56,4 +56,11 @@ declare module Blockly { viewWidth: number; } + /** + * Set the Blockly locale. + * Note: this method is only available in the npm release of Blockly. + * @param {!Object} msg An object of Blockly message strings in the desired + * language. + */ + function setLocale(msg: {[key: string]: string;}): void; } diff --git a/typings/parts/goog-closure.d.ts b/typings/parts/goog-closure.d.ts deleted file mode 100644 index 367be8352..000000000 --- a/typings/parts/goog-closure.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -declare namespace goog { - function require(name: string): void; - function provide(name: string): void; - function inherits(child: any, parent: any): void; - function isFunction(f: any): boolean; -}