Add setLocale to the Blockly typescript definition file. (#3197)

This commit is contained in:
Sam El-Husseini
2019-10-08 11:12:29 -07:00
parent 60d69b9dba
commit cbf8b4b18d
4 changed files with 14 additions and 14 deletions

View File

@@ -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/**`,

14
typings/blockly.d.ts vendored
View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}