{"action":"opened","issue":{"url":"https://api.github.com/repos/milesj/babel-plugin-typescript-to-proptypes/issues/3","repository_url":"https://api.github.com/repos/milesj/babel-plugin-typescript-to-proptypes","labels_url":"https://api.github.com/repos/milesj/babel-plugin-typescript-to-proptypes/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/milesj/babel-plugin-typescript-to-proptypes/issues/3/comments","events_url":"https://api.github.com/repos/milesj/babel-plugin-typescript-to-proptypes/issues/3/events","html_url":"https://github.com/milesj/babel-plugin-typescript-to-proptypes/issues/3","id":380391129,"node_id":"MDU6SXNzdWUzODAzOTExMjk=","number":3,"title":"IndexedAccessType not deeply traversed","user":{"login":"thielium","id":37806340,"node_id":"MDQ6VXNlcjM3ODA2MzQw","avatar_url":"https://avatars3.githubusercontent.com/u/37806340?v=4","gravatar_id":"","url":"https://api.github.com/users/thielium","html_url":"https://github.com/thielium","followers_url":"https://api.github.com/users/thielium/followers","following_url":"https://api.github.com/users/thielium/following{/other_user}","gists_url":"https://api.github.com/users/thielium/gists{/gist_id}","starred_url":"https://api.github.com/users/thielium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thielium/subscriptions","organizations_url":"https://api.github.com/users/thielium/orgs","repos_url":"https://api.github.com/users/thielium/repos","events_url":"https://api.github.com/users/thielium/events{/privacy}","received_events_url":"https://api.github.com/users/thielium/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-13T19:41:06Z","updated_at":"2018-11-13T19:41:06Z","closed_at":null,"author_association":"NONE","body":"Pretty promising lib, thanks for making it. \r\n\r\nI'm doing my best to follow the snapshot format; happy to edit if anything is confusing or inaccurate.\r\n\r\n## Steps to reproduce\r\n\r\nAdd the following fixture\r\n```jsx\r\nimport React from 'react';\r\n\r\ninterface SubProps {\r\n  b: 1 | 2 | 3;\r\n}\r\n\r\nexport interface Props {\r\n  a: SubProps['b'];\r\n}\r\n\r\nexport default class TypeIndexedAccess extends React.Component<Props> {\r\n  render() {\r\n    return null;\r\n  }\r\n}\r\n```\r\n## Expected:\r\n\r\n```jsx\r\nimport _pt from 'prop-types';\r\nimport React from 'react';\r\ninterface SubProps {\r\n  b: 1 | 2 | 3;\r\n}\r\nexport interface Props {\r\n  a: SubProps['b'];\r\n}\r\nexport default class TypeIndexedAccess extends React.Component<Props> {\r\n  static propTypes = {\r\n    a: _pt.oneOf([1,2,3]).isRequired\r\n  };\r\n\r\n  render() {\r\n    return null;\r\n  }\r\n\r\n}\r\n```\r\n\r\n## Actual:\r\n```jsx\r\nimport React from 'react';\r\ninterface SubProps {\r\n  b: 1 | 2 | 3;\r\n}\r\nexport interface Props {\r\n  a: SubProps['b'];\r\n}\r\nexport default class TypeIndexedAccess extends React.Component<Props> {\r\n  render() {\r\n    return null;\r\n  }\r\n}\r\n```"}}
{"actor":{"display_login":"thielium"}}