{"id":15196891,"url":"https://github.com/eth-p/obsidian-undocumented","last_synced_at":"2025-10-28T04:31:35.204Z","repository":{"id":65785638,"uuid":"599410927","full_name":"eth-p/obsidian-undocumented","owner":"eth-p","description":"Definitions for undocumented/private Obsidian.md APIs.","archived":false,"fork":false,"pushed_at":"2023-02-21T02:35:41.000Z","size":38,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T11:24:44.921Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eth-p.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-09T04:25:45.000Z","updated_at":"2024-12-03T19:50:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"a38c9aaf-6a40-45b5-9fe2-39752734f95c","html_url":"https://github.com/eth-p/obsidian-undocumented","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"2e971dea88d3af7d24dc0c3ed3e290c081ea7b5d"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eth-p%2Fobsidian-undocumented","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eth-p%2Fobsidian-undocumented/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eth-p%2Fobsidian-undocumented/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eth-p%2Fobsidian-undocumented/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eth-p","download_url":"https://codeload.github.com/eth-p/obsidian-undocumented/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238597386,"owners_count":19498396,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-28T00:05:59.015Z","updated_at":"2025-10-28T04:31:34.779Z","avatar_url":"https://github.com/eth-p.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# obsidian-undocumented\n[![latest supported version](https://img.shields.io/badge/Obsidian-1.1.0_--_1.1.9-blue?logo=obsidian)](https://obsidian.md/) [![total downloads](https://img.shields.io/npm/dt/obsidian-undocumented?label=Total\u0026logo=npm)](https://www.npmjs.com/package/obsidian-undocumented)\n\nAn extension to the official [`obsidian`](https://www.npmjs.com/package/obsidian) type definitions that provides access to undocumented and internal Obsidian APIs.\n\nThis project aims to provide quality typings that are relevant across a range of public Obsidian versions.\n\n\n## Installation\nUse `npm` or `yarn` to install type definitions for undocumented Obsidian APIs:\n\n```bash\nnpm install obsidian-undocumented\n```\n\n## Usage\nImport the type definitions and use the `as` keyword to cast the official, documented API type into the unofficial one.\n\n```typescript\nimport {Plugin} from \"obsidian\";\nimport {App} from \"obsidian-undocumented\";\n\nexport default MyPlugin extends Plugin {\n\tasync onload() {\n\t\t// Get the enabled instance of the \"other-plugin\" plugin.\n\t\tconst otherPlugin = (this.app as App).plugins.getPlugin(\"other-plugin\");\n\t\totherPlugin.doSomething();\n\t}\n}\n```\n\n### Unsafe API\nThere are two flavors of type definitions available: the default (safe) definitions, and the `unsafe` definitions. The safe definitions provide typings for harmless functions and fields, and the unsafe definitions provide typings that can accidentally break Obsidian or be abused to manipulate other plugins.\n\nThe definition flavors can be picked by either importing `obsidian-undocumented` for the safe definitions or `obsidian-undocumented/unsafe` for the unsafe ones.\n\n**Example:**\n\n```typescript\nimport {Plugin} from \"obsidian\";\nimport {App} from \"obsidian-undocumented/unsafe\";\n\nexport default MyPlugin extends Plugin {\n\tasync onload() {\n\t\t(this.app as App).plugins.disablePlugin(this.manifest.id);\n\t}\n}\n```\n\n### Targeting Specific Obsidian Versions\nIf your plugin has different logic for different Obsidian versions, it is possible to select type definitions matching the specific version. All of the definitions exported by `obsidian-undocumented` contain a generic parameter `V`, which should be a string for one of the [supported versions](#supported-versions).\n\nIf the parameter is omitted, type definitions will be selected for the latest Obsidian version that is supported by this package.\n\n**Example:**\n\n```typescript\nimport { Plugin, apiVersion } from \"obsidian\";\nimport { App, v1_0_0 } from \"obsidian-undocumented\";\n\nexport default class ExamplePlugin extends Plugin {\n\tasync onload() {\n\t\tif (apiVersion === '1.0.0') {\n\t\t\tconst app = this.app as App\u003cv1_0_0\u003e;\n\t\t\t// Do something specific to API version 1.0.0\n\t\t}\n\t}\n}\n\n```\n\n\n## Supported Versions\nUndocumented API type definitions are available for the following Obsidian versions:\n\n- [1.1.9](https://github.com/obsidianmd/obsidian-releases/releases/tag/v1.1.9) (default)\n- [1.1.8](https://github.com/obsidianmd/obsidian-releases/releases/tag/v1.1.8)\n- [1.0.3](https://github.com/obsidianmd/obsidian-releases/releases/tag/v1.0.3)\n- [1.0.0](https://github.com/obsidianmd/obsidian-releases/releases/tag/v1.0.0)\n\nThere are currently no plans to support pre-release or beta versions of Obsidian.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feth-p%2Fobsidian-undocumented","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feth-p%2Fobsidian-undocumented","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feth-p%2Fobsidian-undocumented/lists"}