Skip to content

hide private properties of AppConfigurationImpl #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 3, 2024
Merged

Conversation

Eskibear
Copy link
Member

@Eskibear Eskibear commented Jan 2, 2024

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:

  • private members => prepend # and remove private
  • public members => remove public which is the default scope.

@Eskibear
Copy link
Member Author

Eskibear commented Jan 2, 2024

E.g. try accessing private member client.

const settings = await load(connectionString);

Before:
image

After:
image

@zhiyuanliang-ms
Copy link
Contributor

Will this change raise any concerns about compatibility?

@Eskibear Eskibear merged commit 5c66956 into main Jan 3, 2024
@Eskibear Eskibear deleted the private-member branch January 3, 2024 07:44
@zhiyuanliang-ms
Copy link
Contributor

Should we unify the public/private method in Adapters?

@Eskibear
Copy link
Member Author

Eskibear commented Jan 3, 2024

Should we unify the public/private method in Adapters?

Yes. Tracked in #29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants