Things I have tried
- include following line on top
import { getAPI } from "obsidian-dataview";
=> gives following message:
Module '"obsidian-dataview"' has no exported member 'getAPI'.ts(2305)
I have installed obsidian-dataview via
npm install -D obsidian-dataview
This is the recommended way according to Developing Against Dataview - Dataview. I am very much a newbie in Typescript development and plugin development. Can anyone tell me how to get a step further please. If you need more information
More background: i basically only added this one line to the basic example plugin provided from obsidian side. It works well with out the one line, but is broken when including the import.
What I’m trying to do
I have written a javascript that I currently use with customJS plugin to execute a lot of dataview operations and format the output. Right now it gets to a size where it is not easy to handle it this way anymore and I feel refactoring it into a plugin might give me more options to structure it, test it and include existing code.
Still I would like to use the dataview api, so I can more easily migrate from my existing approach.