{"action":"opened","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3523","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3523/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3523/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3523/events","html_url":"https://github.com/Microsoft/TypeScript/issues/3523","id":88804249,"number":3523,"title":"Question: is there a way to detect a unsound assignment via public compiler API?","user":{"login":"aleksey-bykov","id":937933,"avatar_url":"https://avatars.githubusercontent.com/u/937933?v=3","gravatar_id":"","url":"https://api.github.com/users/aleksey-bykov","html_url":"https://github.com/aleksey-bykov","followers_url":"https://api.github.com/users/aleksey-bykov/followers","following_url":"https://api.github.com/users/aleksey-bykov/following{/other_user}","gists_url":"https://api.github.com/users/aleksey-bykov/gists{/gist_id}","starred_url":"https://api.github.com/users/aleksey-bykov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleksey-bykov/subscriptions","organizations_url":"https://api.github.com/users/aleksey-bykov/orgs","repos_url":"https://api.github.com/users/aleksey-bykov/repos","events_url":"https://api.github.com/users/aleksey-bykov/events{/privacy}","received_events_url":"https://api.github.com/users/aleksey-bykov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-16T18:33:01Z","updated_at":"2015-06-16T18:33:01Z","closed_at":null,"body":"My situation (#3067):\r\n```typescript\r\ninterface A {\r\n    x: string;\r\n}\r\n\r\ninterface B {\r\n    x: string;\r\n    y: string;\r\n}\r\n\r\nfunction copyB(value: B): B {\r\n    return undefined;\r\n}\r\n\r\nvar values: A[] = [];\r\nvalues.map(copyB); // <-- unsound assigment\r\n```\r\nI've managed to get an AST and a type checker. I am holding a reference to the argument (copyB from above) object.\r\n\r\nCan anyone outline the steps that need to be taken to determine that the assignment from the example is unsound using the public compiler API?"}}