Skip to content

Use Window augmentation instead of declare global var #6

@jacksteamdev

Description

@jacksteamdev

We should try augmenting the Window interface instead of using var: https://www.perplexity.ai/search/find-some-documentation-on-why-28TclBZATv2iVaO2wsbf1g

declare global {
// eslint-disable-next-line no-var
var SmartSearch: SmartSearch | undefined;
}

From obsidianmd/obsidian-releases#5060 (comment):

You should change all instances of var to either const or let. var has function-level scope, so it can easily lead to bugs if you're not careful. Here's a pretty good guide with examples of why not to use var: why var is obsolete

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions