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

refactor: add type definitions #14

Merged
merged 1 commit into from
Nov 28, 2022

Conversation

windingwind
Copy link

No description provided.

@windingwind
Copy link
Author

有些地方成员属性this.window, this.document, 和非箭头函数内的this(默认即指向window)混用,感觉会不太方便维护

@windingwind
Copy link
Author

windingwind commented Nov 28, 2022

https://github.com/MuiseDestiny/ZoteroStyle/blob/c820e2dafcc6f7c1dfad33096cb5c42495aebe98/src/events.ts#L302

这里直接用this.tagAlign即可访问,用obj.getValue的话就没有类型检查和错误提示了

所有AddonModule的实例内,可以通过this.xxx访问自己的成员属性;AddonModule的实例之间,通过this._Addon.$ModuleName$.xxx访问public属性

@MuiseDestiny MuiseDestiny merged commit 7b3f0d6 into MuiseDestiny:bootstrap Nov 28, 2022
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