inversify / InversifyJS

A powerful and lightweight inversion of control container for JavaScript & Node.js apps powered by TypeScript.
http://inversify.io/
MIT License
11.21k stars 715 forks source link

fields at innjectable classes work as static #1479

Open Nau077 opened 2 years ago

Nau077 commented 2 years ago

Expected Behavior

classess fields must work as usuasl javascript classes fields.


@injectable()
export class SomeClass implements ISomeClass {
  private some_array;

...

}

"this.some_array" field as result shoudnot work as "static some_array" - but some_array`s behaviour is simillar to the static properties

Current Behavior

At the some calls of this injectable class I can see in simillar fields as "some_array" data from previos injectable class calls.

Possible Solution

Fix this strange behaviour. Make fields in injectables classes work as simple fields in javascripts, not as static fields.