Skip to content

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
Member

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
Member

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.

3 participants