Skip to content

TypeScript unhappy with 'blockly/javascript' exports #7283

@root-goblin

Description

@root-goblin

TL;DR

import { Order } from 'blockly/javascript';

Fails to compile without // @ts-ignore flag

Temporary fix

Adding // @ts-ignore comment will allow it to compile and run without any noted errors

// @ts-ignore
import { Order } from 'blockly/javascript';

Details

Didn't have time to look too deeply into the issue, but this is what I've dug up from a cursory look:

Looks like Order is not being exported in the javascript.d.ts file - https://github.com/google/blockly/blob/blockly-v10.0.1/typings/javascript.d.ts

Might be because typescript does not like the export * from ... syntax in original javascript.js source - https://github.com/google/blockly/blob/blockly-v10.0.1/generators/javascript.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions