Include d.ts only module with global module
I'm trying to write a plugin for obsidian, which works by providing globals in place. They provide a package for the types for these globals in npm "obsidian" https://github.com/obsidianmd/obsidian-api/blob/master/obsidian.d.ts
I have tried using a triple slash reference like
/// <reference types="npm:obsidian/obsidian.d.ts" />
and /// <reference types="npm:obsidian" />
but I still get reference errors: error: Uncaught (in promise) ReferenceError: Plugin is not defined
I've also tried addind npm:obsidian
as a dependency and importing the classes into the file but I get module resolution errors:
Lastly I've tried setting it in compiler options in deno.json but it also hasn't worked.
Thanks in advance for any help.GitHub
obsidian-api/obsidian.d.ts at master · obsidianmd/obsidian-api
Type definitions for the latest Obsidian API. Contribute to obsidianmd/obsidian-api development by creating an account on GitHub.
0 Replies