{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/8536","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/8536/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/8536/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/8536/events","html_url":"https://github.com/Microsoft/TypeScript/issues/8536","id":153861122,"number":8536,"title":"Fluent API \"double dot\" support:","user":{"login":"pankleks","id":14176066,"avatar_url":"https://avatars.githubusercontent.com/u/14176066?v=3","gravatar_id":"","url":"https://api.github.com/users/pankleks","html_url":"https://github.com/pankleks","followers_url":"https://api.github.com/users/pankleks/followers","following_url":"https://api.github.com/users/pankleks/following{/other_user}","gists_url":"https://api.github.com/users/pankleks/gists{/gist_id}","starred_url":"https://api.github.com/users/pankleks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pankleks/subscriptions","organizations_url":"https://api.github.com/users/pankleks/orgs","repos_url":"https://api.github.com/users/pankleks/repos","events_url":"https://api.github.com/users/pankleks/events{/privacy}","received_events_url":"https://api.github.com/users/pankleks/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Suggestion","name":"Suggestion","color":"006b75"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-09T20:22:42Z","updated_at":"2016-05-10T17:13:17Z","closed_at":"2016-05-10T17:13:17Z","body":"Does anyone thought about adding support for fluent API (something similar/same as Dart does)?\r\n```ts\r\nclass A {\r\n  k = 10;\r\n  constructor(private n) {\r\n  }\r\n\r\n  run(): void { ... }\r\n\r\n  test(): void { ... }\r\n}\r\n\r\nnew A(2)\r\n  ..k = 20\r\n  ..run()\r\n  ..test();\r\n```\r\n\r\nthis could be translated to:\r\n```javascript\r\nvar a = new A(2);\r\na.k = 20;\r\na.run();\r\na.test();\r\n```\r\n\r\nThat would simplify a lot writing A class in a way fluent API is supported."}}