obsidianmd/obsidian-developer-docs

`Workspace.getLeafById` is mistyped

RyotaUshio opened this issue · 2 comments

The documentation (https://docs.obsidian.md/Reference/TypeScript+API/Workspace/getLeafById) says

getLeafById(id: string): WorkspaceLeaf;

But if id is just a random string, it returns null. So instead it should be

getLeafById(id: string): WorkspaceLeaf | null;

Thanks

Deployed