有没有开发 obsidian 插件的佬友?我想使用 “obsidian-typings” 来补充官方未提供的类型和接口。我按照 Getting Started | Obsidian Typings 配置的 tsconfig.json 内容如下:
{
"compilerOptions": {
"lib": ["DOM", "ES2021"],
"jsx": "preserve",
"target": "ES2021",
"noEmit": true,
"skipLibCheck": true,
"jsxImportSource": "vue",
"useDefineForClassFields": true,
/* modules */
"module": "ESNext",
"moduleDetection": "force",
"moduleResolution": "node",
"verbatimModuleSyntax": true,
"resolveJsonModule": true,
"allowImportingTsExtensions": true,
"noUncheckedSideEffectImports": true,
/* type checking */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"baseUrl": ".",
"paths": {
"@*": ["src/*"]
},
"types": ["obsidian-typings"]
},
"include": ["src"]
}
但是对于 app.workspace.getActiveFileView,vsc 仍然提示:属性“getActiveFileView”在类型“Workspace”上不存在。折腾了好久也没折腾明白该如何实现 obsidian-typings 对 obsidian 的类型扩充。佬友们,求助啊啊啊啊
![]()

