From 87aa4c0f625e3a2c99c149c6095f32c20116de7c Mon Sep 17 00:00:00 2001 From: Maribeth Bottorff Date: Wed, 1 Jun 2022 15:20:23 -0700 Subject: [PATCH] fix: Update typescript definition files for core, blocks, and generators (#6174) * fix: update definitions for core and blocks * fix: update javascript definition * fix: update JS definition to work with both import types * fix: update typings for blocks --- typings/blocks.d.ts | 13 +++++++++++-- typings/core.d.ts | 3 +-- typings/index.d.ts | 9 ++++----- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/typings/blocks.d.ts b/typings/blocks.d.ts index 851c08ddd..cfbae6bab 100644 --- a/typings/blocks.d.ts +++ b/typings/blocks.d.ts @@ -11,5 +11,14 @@ /// -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; diff --git a/typings/core.d.ts b/typings/core.d.ts index 79d382834..21501792f 100644 --- a/typings/core.d.ts +++ b/typings/core.d.ts @@ -11,5 +11,4 @@ /// -import * as Blockly from 'blockly'; -export = Blockly; +export * from 'core/blockly'; diff --git a/typings/index.d.ts b/typings/index.d.ts index fd92cae72..84d97360c 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -14,9 +14,8 @@ /// /// -import * as Blockly from './core'; -import './blocks'; -import './javascript'; +import { Generator } from 'core/blockly'; +export * from './core'; +export * as libraryBlocks from './blocks'; +export const JavaScript: Generator; import './msg/msg'; - -export = Blockly;