young-steveo / bottlejs

A powerful dependency injection micro container for JavaScript applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BottleJS container dependencies with IDE IntelliSense, type checking and autocomplete?

gabrieloczkowski opened this issue · comments

Hi.
Is there any way to have IntelliSense, type checking and code autocompletion inside IDE (VSC) when using BottleJS container dependencies with JavaScript?
Do you have any solutions for it like JSDoc?
Please provide some examples.

The problem is that VSC does not recognize properties added to objects dynamically via Object.defineProperty. This bug ticket (and the subsequently referenced tickets in the comments) leads to that conclusion: microsoft/vscode#55390 Unfortunately, Object.defineProperty is core to how bottle.js works.

You might be able to add a docblock to your local container object, but ymmv.