blacksmithgu / obsidian-dataview

A data index and query language over Markdown files, for https://obsidian.md/.
https://blacksmithgu.github.io/obsidian-dataview/
MIT License
6.99k stars 410 forks source link

`obsidian-dataview` npm package types don't pull into Typescript project #2209

Open SkepticMystic opened 9 months ago

SkepticMystic commented 9 months ago

What happened?

Following the guide here to Develop Against Dataview. I ran npm i -D obsidian-dataview, which works fine. I'm able to use the javascript parts of the pacakge - getAPI() works just fine, for example. However, the types aren't recognised. The DataviewAPI type has no info on it, it's basically just seen as any

DQL

No response

JS

import { getAPI } from "obsidian-dataview"

// No intellisense. The `DataviewAPI` type returned from `getAPI` has no actual info on it
getAPI()?.<Ctrl + Space>

Dataview Version

"obsidian-dataview": "^0.5.64"

Obsidian Version

"obsidian": "^1.4.11"

OS

Linux

mAAdhaTTah commented 2 days ago

I'm also experiencing this. It looks like the types are exported such that they're not mapped internally correctly:

Screenshot 2024-10-24 at 11 09 29 PM