Import Error with TypeScript
See original GitHub issueHi @jerosoler , I’m trying to implement the library and everything worked fine, so I started to make the file a Typescript file. But now I get the following error:
setup() {
const Vue = { version: 3, h, render }
const internalInstance = getCurrentInstance()
return { Vue, internalInstance }
},
....
setupEditor(){
this.editor = new Drawflow(
id,
this.Vue,
this.internalInstance.appContext.app._context,
)
}
Expected 1 arguments, but got 3.Vetur(2554)
Is there something defined in the Drawflow constructor I’m not aware of, or do you know why this happens?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
TypeScript syntax error when importing - Stack Overflow
In short, I import a class named Point from the module point. The error suggests that a curly brace is wrong. The error...
Read more >Common TypeScript module problems and how to solve them
Solution 2: Locate the module and resolve imports ; "*" value in the array means the exact name of the module, while the...
Read more >Cannot use import statement outside a module [React ...
In this article, we talked about the SyntaxError: Cannot use import statement outside a module error in TypeScript and JavaScript. This error ......
Read more >Documentation - Module Resolution - TypeScript
Module resolution is the process the compiler uses to figure out what an import refers to. Consider an import statement like import {...
Read more >False errors in Typescript files, import statements are not ...
While working with Typescript I import dependencies from other files. Resharper grays them out as not used and then further in the code...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I “solved” the style error by importing the css in the index.html
instead of like this:
@SilasNiewierra for the record, styles should be imported without name.
import 'drawflow/dist/drawflow.min.css'