<!-- Please follow the issue template below for bug reports and feature requests. Also please indicate in the issue title which language/library is concerned. Eg: [JAVA] Bug generating foo with bar --> ##### Description Typescript 2.1 allows object spread (see https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-1.html#object-spread-and-rest). The Typescript templates currently define an `extendObj` method to achieve this same feature e.g. https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/resources/typescript-angular2/api.mustache#L44-L51 <!-- describe what is the question, suggestion or issue and why this is a problem for you. --> ##### Swagger-codegen version 2.2.1 <!-- which version of swagger-codegen are you using, is it a regression? --> ##### Suggest a Fix Remove `extendObj` in api.mustache files and just utilise object rest operator. I can provide a fix with a PR unless there's any reason not to...