You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@chi-w-ng I don't have much Typescript experience, so I'll have to research this. One thing I would ask is whether you have run npm install mit-app-inventor/blockly-block-lexical-variables --save or the equivalent?
@chi-w-ng I suspect that at least part of the problem is that there is no Typescript declaration file for this package. Since I don't have much Typescript experience, I wonder if you might be willing to work on this and submit a pull request.
I encountered a 'could not resolve module' error while using it in a TypeScript project.
To replicate this issue, you can follow these steps:
Start with the Blockly TypeScript sample from:
https://github.com/google/blockly-samples/tree/master/examples/sample-app-ts
Change the tsconfig.json content to:
{
"compilerOptions": {
"baseUrl": "./",
"outDir": "dist",
"declaration": true,
"declarationMap": true,
"module": "ES2015",
"moduleResolution": "node",
"target": "ES2015",
"strict": false,
"sourceMap": true,
"allowJs": true
},
"include": ["desc.d.ts"]
}
Here is the desc.d.ts content that I add to the project root:
declare module "@mit-app-inventor/blockly-block-lexical-variables"
Add the plugin to index.ts of the blockly sample ts project. Build the project will error.
Is there a way to resolve this issue?
Thanks in advance.
The text was updated successfully, but these errors were encountered: