{"action":"opened","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/issues/188","repository_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage","labels_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/issues/188/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/issues/188/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript-TmLanguage/issues/188/events","html_url":"https://github.com/Microsoft/TypeScript-TmLanguage/issues/188","id":160509150,"number":188,"title":"TypeScript syntax highlighting breaks for class methods returning a type ending in a digit","user":{"login":"aeschli","id":6461412,"avatar_url":"https://avatars.githubusercontent.com/u/6461412?v=3","gravatar_id":"","url":"https://api.github.com/users/aeschli","html_url":"https://github.com/aeschli","followers_url":"https://api.github.com/users/aeschli/followers","following_url":"https://api.github.com/users/aeschli/following{/other_user}","gists_url":"https://api.github.com/users/aeschli/gists{/gist_id}","starred_url":"https://api.github.com/users/aeschli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aeschli/subscriptions","organizations_url":"https://api.github.com/users/aeschli/orgs","repos_url":"https://api.github.com/users/aeschli/repos","events_url":"https://api.github.com/users/aeschli/events{/privacy}","received_events_url":"https://api.github.com/users/aeschli/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-15T19:54:26Z","updated_at":"2016-06-15T19:54:26Z","closed_at":null,"body":"_From @lostfictions on June 3, 2016 7:45_\n\nThis is a bit of a strange one. In the screenshot below, a class with two methods is declared. The first returns a `number` and has correct syntax highlighting. The second has an almost identical body but returns an `endsWithDigit1` (a type alias for `number`), which breaks highlighting for the method body.\r\n\r\n(On a more practical level, I discovered this while trying write a method that returned a `Matrix4x4`, so it's definitely something that might happen in day-to-day use!)\r\n\r\n![bug](https://cloud.githubusercontent.com/assets/567041/15771924/052546c4-293c-11e6-87cd-2afc663a68e0.png)\r\n\r\n\r\n- VSCode Version: 1.1.1\r\n- OS Version: Ubuntu 14.04\r\n\r\nSteps to Reproduce:\r\n\r\nThe repro code in the screenshot above is as follows:\r\n\r\n```typescript\r\ntype endsWithDigit1 = number\r\n\r\nclass Repro {\r\n  normalMember() : number {\r\n\r\n    const someDeclaration : (name : string) => string = (name) => 'hello there ' + name\r\n    const myString = someDeclaration('human')\r\n    let coolNumber = myString.length + 20\r\n    var anotherCoolThing = {\r\n      pigs: 6,\r\n      rabbits: 29,\r\n      horseName: 'Johnny'\r\n    }\r\n    \r\n    console.log('this is how the syntax highlighting should look!')\r\n    \r\n    return 1\r\n  }\r\n  \r\n  badHighlightingMember() : endsWithDigit1 {\r\n    \r\n    const someDeclaration : (name : string) => string = (name) => 'hello there ' + name\r\n    const myString = someDeclaration('human')\r\n    let coolNumber = myString.length + 20\r\n    var anotherCoolThing = {\r\n      pigs: 6,\r\n      rabbits: 29,\r\n      horseName: 'Johnny'\r\n    }\r\n    \r\n    console.log('this has some highlighting but the colors are wrong')\r\n    \r\n    return 1\r\n  }\r\n}\r\n```\r\n\n\n_Copied from original issue: Microsoft/vscode#7170_"}}
{"actor":{"display_login":"aeschli"}}