{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/10335","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/10335/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/10335/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/10335/events","html_url":"https://github.com/Microsoft/TypeScript/issues/10335","id":171148476,"number":10335,"title":"Auto-indentation problem with promise blocks","user":{"login":"dbaeumer","id":1931590,"avatar_url":"https://avatars.githubusercontent.com/u/1931590?v=3","gravatar_id":"","url":"https://api.github.com/users/dbaeumer","html_url":"https://github.com/dbaeumer","followers_url":"https://api.github.com/users/dbaeumer/followers","following_url":"https://api.github.com/users/dbaeumer/following{/other_user}","gists_url":"https://api.github.com/users/dbaeumer/gists{/gist_id}","starred_url":"https://api.github.com/users/dbaeumer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbaeumer/subscriptions","organizations_url":"https://api.github.com/users/dbaeumer/orgs","repos_url":"https://api.github.com/users/dbaeumer/repos","events_url":"https://api.github.com/users/dbaeumer/events{/privacy}","received_events_url":"https://api.github.com/users/dbaeumer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Accepting%20PRs","name":"Accepting PRs","color":"009800"},{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Bug","name":"Bug","color":"e11d21"},{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Domain:%20Formatter","name":"Domain: Formatter","color":"8255cc"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/Microsoft/TypeScript/milestones/2","html_url":"https://github.com/Microsoft/TypeScript/milestones/Community","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/milestones/2/labels","id":721044,"number":2,"title":"Community","description":"Issues in the 'Community' milestone are ones which we are accepting pull requests for","creator":{"login":"RyanCavanaugh","id":6685088,"avatar_url":"https://avatars.githubusercontent.com/u/6685088?v=3","gravatar_id":"","url":"https://api.github.com/users/RyanCavanaugh","html_url":"https://github.com/RyanCavanaugh","followers_url":"https://api.github.com/users/RyanCavanaugh/followers","following_url":"https://api.github.com/users/RyanCavanaugh/following{/other_user}","gists_url":"https://api.github.com/users/RyanCavanaugh/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanCavanaugh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanCavanaugh/subscriptions","organizations_url":"https://api.github.com/users/RyanCavanaugh/orgs","repos_url":"https://api.github.com/users/RyanCavanaugh/repos","events_url":"https://api.github.com/users/RyanCavanaugh/events{/privacy}","received_events_url":"https://api.github.com/users/RyanCavanaugh/received_events","type":"User","site_admin":false},"open_issues":206,"closed_issues":95,"state":"open","created_at":"2014-07-14T23:24:58Z","updated_at":"2016-09-02T22:01:57Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2016-08-15T10:49:11Z","updated_at":"2016-09-05T14:06:20Z","closed_at":null,"body":"_From @lumaxis on August 12, 2016 0:7_\n\n- VSCode Version: 1.5.0-insider (666ed83a2d465257201cdac215a553ddee3cccbe)\r\n- OS Version: 10.11.6\r\n\r\nSteps to Reproduce:\r\n\r\n1. Create a Typescript file and start writing code using promises\r\n2. Auto-indent file using ~~Shift+Alt+D~~ Shift+Alt-F\r\n\r\nExpected Result:\r\n\r\n```typescript\r\nreturn output\r\n.then((result: ControllerResponse) => {\r\n  return res\r\n  .status(result.statusCode)\r\n  .json(result.payload);\r\n})\r\n```\r\n\r\nActual Result:\r\n\r\n```typescript\r\nreturn output\r\n  .then((result: ControllerResponse) => {\r\n    return res\r\n    .status(result.statusCode)\r\n    .json(result.payload);\r\n  })\r\n```\r\n\r\nDescription:\r\n\r\nThe problem with the current way is that it leads to a strange indentation on the closing braces:\r\n```typescript\r\n    });\r\n}\r\n```\r\n\r\nHere, the closing curly braces and parentheses for the `.then()` block are indented 4 spaces instead of 2 spaces as they should be.\n\n_Copied from original issue: Microsoft/vscode#10453_"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/244754972","html_url":"https://github.com/Microsoft/TypeScript/issues/10335#issuecomment-244754972","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/10335","id":244754972,"user":{"login":"SaschaNaz","id":3396686,"avatar_url":"https://avatars.githubusercontent.com/u/3396686?v=3","gravatar_id":"","url":"https://api.github.com/users/SaschaNaz","html_url":"https://github.com/SaschaNaz","followers_url":"https://api.github.com/users/SaschaNaz/followers","following_url":"https://api.github.com/users/SaschaNaz/following{/other_user}","gists_url":"https://api.github.com/users/SaschaNaz/gists{/gist_id}","starred_url":"https://api.github.com/users/SaschaNaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SaschaNaz/subscriptions","organizations_url":"https://api.github.com/users/SaschaNaz/orgs","repos_url":"https://api.github.com/users/SaschaNaz/repos","events_url":"https://api.github.com/users/SaschaNaz/events{/privacy}","received_events_url":"https://api.github.com/users/SaschaNaz/received_events","type":"User","site_admin":false},"created_at":"2016-09-05T14:06:20Z","updated_at":"2016-09-05T14:06:20Z","body":"Isn't this by design? I thought property accesses are being indented intentionally.\r\n\r\n```ts\r\nfoo\r\n  .bar\r\n  .baz\r\n```"}}
{"actor":{"display_login":"SaschaNaz"}}