Skip to content
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

Hide private instance state #16

Merged
merged 2 commits into from
Oct 18, 2019
Merged

Hide private instance state #16

merged 2 commits into from
Oct 18, 2019

Conversation

dgraham
Copy link
Contributor

@dgraham dgraham commented Oct 18, 2019

Move private instance variables into a WeakMap so they aren't exposed as public API on the element. The private variables are removed from the type declaration file as well.

$ diff dist-master/index.d.ts dist/index.d.ts

<     currentQuery: string | null;
<     debounceInputChange: (event: Event) => void;
<     boundFetchResults: (event: Event) => void;

Move private instance variables into a WeakMap so they aren't exposed as
public API on the element.
@dgraham dgraham requested a review from a team October 18, 2019 17:48
@dgraham dgraham merged commit dff602d into master Oct 18, 2019
@dgraham dgraham deleted the private-state branch October 18, 2019 19:17
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