Azure / AppConfiguration-JavaScriptProvider

The configuration provider for consuming data in Azure App Configuration from JavaScript applications like Node or browser apps.
https://github.com/Azure/AppConfiguration
MIT License
6 stars 1 forks source link

hide private properties of AppConfigurationImpl #37

Closed Eskibear closed 6 months ago

Eskibear commented 6 months ago

See #29

Previously, TS keyword private only during compilation stage. In JS you can still access "private members" if you insist. This PR adopts private properties from ECMAScript, forbidding the access of private members, for JavaScript in runtime.

Code changes:

Eskibear commented 6 months ago

E.g. try accessing private member client.

const settings = await load(connectionString);

Before: image

After: image

zhiyuanliang-ms commented 6 months ago

Will this change raise any concerns about compatibility?

zhiyuanliang-ms commented 6 months ago

Should we unify the public/private method in Adapters?

Eskibear commented 6 months ago

Should we unify the public/private method in Adapters?

Yes. Tracked in #29