hiyayakk0
hiyayakk0
DDeno
Created by hiyayakk0 on 10/23/2024 in #help
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:
error: Could not resolve 'npm:obsidian@1.7.2'.

Caused by:
[ERR_MODULE_NOT_FOUND] Cannot find module 'file:///var/home/<user>/.cache/deno/npm/registry.npmjs.org/obsidian/1.7.2/index.js'
error: Could not resolve 'npm:obsidian@1.7.2'.

Caused by:
[ERR_MODULE_NOT_FOUND] Cannot find module 'file:///var/home/<user>/.cache/deno/npm/registry.npmjs.org/obsidian/1.7.2/index.js'
Lastly I've tried setting it in compiler options in deno.json but it also hasn't worked. Thanks in advance for any help.
1 replies