mirror of
https://github.com/google/blockly.git
synced 2026-01-10 02:17:09 +01:00
fix: Fix errors in TS declarations with blocks and generators (#6200)
This commit is contained in:
committed by
GitHub
parent
7c762084f9
commit
d61f4cad8d
4
typings/blockly.d.ts
vendored
4
typings/blockly.d.ts
vendored
@@ -531,13 +531,13 @@ declare module "core/blocks" {
|
||||
* A block definition. For now this very lose, but it can potentially
|
||||
* be refined e.g. by replacing this typedef with a class definition.
|
||||
*/
|
||||
export type BlockDefinition = Object;
|
||||
export type BlockDefinition = any;
|
||||
/**
|
||||
* A block definition. For now this very lose, but it can potentially
|
||||
* be refined e.g. by replacing this typedef with a class definition.
|
||||
* @typedef {!Object}
|
||||
*/
|
||||
export let BlockDefinition: any;
|
||||
// export let BlockDefinition: any;
|
||||
/**
|
||||
* A mapping of block type names to block prototype objects.
|
||||
* @type {!Object<string,!BlockDefinition>}
|
||||
|
||||
13
typings/blocks.d.ts
vendored
13
typings/blocks.d.ts
vendored
@@ -11,5 +11,14 @@
|
||||
|
||||
/// <reference path="core.d.ts" />
|
||||
|
||||
import * as Blockly from './core';
|
||||
export = Blockly.Blocks;
|
||||
export const colour: any;
|
||||
export const lists: any;
|
||||
export const logic: any;
|
||||
export const loops: any;
|
||||
export const math: any;
|
||||
export const procedures: any;
|
||||
export const texts: any;
|
||||
export const variables: any;
|
||||
export const variablesDynamic: any;
|
||||
|
||||
export const blocks: any;
|
||||
|
||||
3
typings/core.d.ts
vendored
3
typings/core.d.ts
vendored
@@ -11,5 +11,4 @@
|
||||
|
||||
/// <reference path="blockly.d.ts" />
|
||||
|
||||
import * as Blockly from 'blockly';
|
||||
export = Blockly;
|
||||
export * from 'core/blockly';
|
||||
|
||||
2
typings/dart.d.ts
vendored
2
typings/dart.d.ts
vendored
@@ -12,5 +12,5 @@
|
||||
/// <reference path="core.d.ts" />
|
||||
|
||||
import * as Blockly from './core';
|
||||
declare const dart: Blockly.Generator;
|
||||
declare const dart: any;
|
||||
export = dart;
|
||||
|
||||
8
typings/index.d.ts
vendored
8
typings/index.d.ts
vendored
@@ -14,9 +14,7 @@
|
||||
/// <reference path="javascript.d.ts" />
|
||||
/// <reference path="msg/msg.d.ts" />
|
||||
|
||||
import * as Blockly from './core';
|
||||
import './blocks';
|
||||
import './javascript';
|
||||
export * from './core';
|
||||
export * as libraryBlocks from './blocks';
|
||||
export const JavaScript: any;
|
||||
import './msg/msg';
|
||||
|
||||
export = Blockly;
|
||||
|
||||
2
typings/javascript.d.ts
vendored
2
typings/javascript.d.ts
vendored
@@ -12,5 +12,5 @@
|
||||
/// <reference path="core.d.ts" />
|
||||
|
||||
import * as Blockly from './core';
|
||||
declare const javascript: Blockly.Generator;
|
||||
declare const javascript: any;
|
||||
export = javascript;
|
||||
|
||||
2
typings/lua.d.ts
vendored
2
typings/lua.d.ts
vendored
@@ -12,5 +12,5 @@
|
||||
/// <reference path="core.d.ts" />
|
||||
|
||||
import * as Blockly from './core';
|
||||
declare const lua: Blockly.Generator;
|
||||
declare const lua: any;
|
||||
export = lua;
|
||||
|
||||
2
typings/php.d.ts
vendored
2
typings/php.d.ts
vendored
@@ -12,5 +12,5 @@
|
||||
/// <reference path="core.d.ts" />
|
||||
|
||||
import * as Blockly from './core';
|
||||
declare const php: Blockly.Generator;
|
||||
declare const php: any;
|
||||
export = php;
|
||||
|
||||
2
typings/python.d.ts
vendored
2
typings/python.d.ts
vendored
@@ -12,5 +12,5 @@
|
||||
/// <reference path="core.d.ts" />
|
||||
|
||||
import * as Blockly from './core';
|
||||
declare const python: Blockly.Generator;
|
||||
declare const python: any;
|
||||
export = python;
|
||||
|
||||
Reference in New Issue
Block a user