{"action":"opened","issue":{"url":"https://api.github.com/repos/TonyPythoneer/technique-note/issues/22","repository_url":"https://api.github.com/repos/TonyPythoneer/technique-note","labels_url":"https://api.github.com/repos/TonyPythoneer/technique-note/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/TonyPythoneer/technique-note/issues/22/comments","events_url":"https://api.github.com/repos/TonyPythoneer/technique-note/issues/22/events","html_url":"https://github.com/TonyPythoneer/technique-note/issues/22","id":133655421,"number":22,"title":"2016_02_15_typescript實作es6 class心得","user":{"login":"TonyPythoneer","id":10459119,"avatar_url":"https://avatars.githubusercontent.com/u/10459119?v=3","gravatar_id":"","url":"https://api.github.com/users/TonyPythoneer","html_url":"https://github.com/TonyPythoneer","followers_url":"https://api.github.com/users/TonyPythoneer/followers","following_url":"https://api.github.com/users/TonyPythoneer/following{/other_user}","gists_url":"https://api.github.com/users/TonyPythoneer/gists{/gist_id}","starred_url":"https://api.github.com/users/TonyPythoneer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TonyPythoneer/subscriptions","organizations_url":"https://api.github.com/users/TonyPythoneer/orgs","repos_url":"https://api.github.com/users/TonyPythoneer/repos","events_url":"https://api.github.com/users/TonyPythoneer/events{/privacy}","received_events_url":"https://api.github.com/users/TonyPythoneer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-15T08:48:51Z","updated_at":"2016-02-15T08:48:51Z","closed_at":null,"body":"private: `instance`私人屬性，instance化後，不可經由外部讀取的屬性。必須經由必須經由特定instance函數進行讀寫。\r\npublic: `instance`開放屬性，instance化後，可經由外部讀取的屬性。\r\npublic static: `class`的專屬開放屬性，class上進行`讀寫`的屬性；但instance化後，不可使用該屬性\r\nprivate static: `class`的專屬開放屬性，class上僅可`讀取`的使用該屬性；但instance化後，不可使用該屬性。\r\n\r\n以上關係畫圖如下:\r\n\r\n|                | class r/w | instance r/w |\r\n|----------------|-----------|--------------|\r\n| public         | X/X       | O/O          |\r\n| private        | X/X       | X/X          |\r\n| public static  | O/O       | X/X          |\r\n| private static | O/X       | X/X          |\r\n\r\n\r\n* 若變數型態只設static，typescript預設為public。\r\n"}}