Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using typescript 2.1.4 object spread operator #4409

Closed
wants to merge 1 commit into from
Closed

Using typescript 2.1.4 object spread operator #4409

wants to merge 1 commit into from

Conversation

damienpontifex
Copy link
Contributor

@damienpontifex damienpontifex commented Dec 16, 2016

PR checklist

  • Read the contribution guildelines.
  • Ran the shell/batch script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates)
  • Filed the PR against the correct branch: master for non-breaking changes and 2.3.0 branch for breaking (non-backward compatible) changes.

Description of the PR

(details of the change, additional tests that have been done, reference to the issue for tracking, etc)

Resolves #4407 by replacing extendObj function by Typescript 2.1.4s object spread operator functionality

@wing328
Copy link
Contributor

wing328 commented Dec 16, 2016

@damienpontifex thanks for the PR. Please run the following to update the Petstore samples so that CIs can verify the change.

./bin/typescript-node-petstore-all.sh
./bin/typescript-angular2-petstore-all.sh
./bin/typescript-angular-petstore.sh

@damienpontifex
Copy link
Contributor Author

Thanks @wing328 I've run the scripts and squashed the updated samples and template changes into a single commit again.

@wing328
Copy link
Contributor

wing328 commented Dec 20, 2016

@damienpontifex thanks but Travis reports issue with the TS Angular Petstore client and here is part of the error message:

API/Client/PetApi.ts(41,64): error TS1136: Property assignment expected.
API/Client/PetApi.ts(41,71): error TS1005: ':' expected.
API/Client/PetApi.ts(51,39): error TS1136: Property assignment expected.
API/Client/PetApi.ts(51,61): error TS1136: Property assignment expected.
API/Client/PetApi.ts(67,64): error TS1136: Property assignment expected.
API/Client/PetApi.ts(67,71): error TS1005: ':' expected.
API/Client/PetApi.ts(82,39): error TS1136: Property assignment expected.
API/Client/PetApi.ts(82,61): error TS1136: Property assignment expected.
API/Client/PetApi.ts(96,64): error TS1136: Property assignment expected.
API/Client/PetApi.ts(96,71): error TS1005: ':' expected.

Ref: https://s3.amazonaws.com/archive.travis-ci.org/jobs/185324798/log.txt

@damienpontifex
Copy link
Contributor Author

@wing328 fixed up all the required changes in the samples and moved the sample typescript dependencies up to 2.1.4. Also moved them to use declaration files from npm to align with updated TypeScript recommendations of handling type definitions

"tsd": "^0.6.3",
"typescript": "^1.5.3"
"typescript": "^2.1.4",
"@types/angular": "^1.5.21"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@damienpontifex If I understand correctly, the change is not backward compatible with the existing TS clients so please submit the PR against the 2.3.0 branch instead.

@damienpontifex
Copy link
Contributor Author

@wing328 see #4562 for better backwards compatibility achieving the same results. This PR can be closed in favour of that as desired.

@wing328
Copy link
Contributor

wing328 commented Jan 17, 2017

Closed via #4562

@wing328 wing328 closed this Jan 17, 2017
@damienpontifex damienpontifex deleted the tsc-object-spread branch January 17, 2017 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants