javascript - Still cannot access private functions of class after instantiation
漂亮男人
漂亮男人 2017-06-26 10:57:48
0
1
715

After instantiating alarm, why can’t it access its private private functions findCache and addCache through .: alarm is shown in the figure

Instantiation and calling:

漂亮男人
漂亮男人

reply all(1)
typecho

Didn’t you already say that this is a private function? How to access the private function? The official document is as follows:

When a member is marked private, it cannot be accessed from outside of its containing class.

https://www.typescriptlang.or...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!