Skip to content

Commit

Permalink
Fix angular 7 compile problem (OpenAPITools#1297)
Browse files Browse the repository at this point in the history
* fix wrong formParams type

* run typescript-angular-petstore-all.bat

* more typesafe fix

* fix formatting

* run typescript-angular-petstore-all.bat

* fix compile  problem with previous versions of angular

* generate code

* fix compile problem add <any>

* try Johannes Hoppe solution

* generate files
  • Loading branch information
topce authored and wing328 committed Oct 27, 2018
1 parent 695203b commit 947b0d9
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export class {{classname}} {
{{#hasFormParams}}
const canConsumeForm = this.canConsumeForm(consumes);

let formParams: { append(param: string, value: any): void; };
let formParams: { append(param: string, value: any): any; };
let useForm = false;
let convertFormParamsToString = false;
{{#formParams}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ export class PetService {

const canConsumeForm = this.canConsumeForm(consumes);

let formParams: { append(param: string, value: any): void; };
let formParams: { append(param: string, value: any): any; };
let useForm = false;
let convertFormParamsToString = false;
if (useForm) {
Expand Down Expand Up @@ -613,7 +613,7 @@ export class PetService {

const canConsumeForm = this.canConsumeForm(consumes);

let formParams: { append(param: string, value: any): void; };
let formParams: { append(param: string, value: any): any; };
let useForm = false;
let convertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ export class PetService {

const canConsumeForm = this.canConsumeForm(consumes);

let formParams: { append(param: string, value: any): void; };
let formParams: { append(param: string, value: any): any; };
let useForm = false;
let convertFormParamsToString = false;
if (useForm) {
Expand Down Expand Up @@ -613,7 +613,7 @@ export class PetService {

const canConsumeForm = this.canConsumeForm(consumes);

let formParams: { append(param: string, value: any): void; };
let formParams: { append(param: string, value: any): any; };
let useForm = false;
let convertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ export class PetService implements PetServiceInterface {

const canConsumeForm = this.canConsumeForm(consumes);

let formParams: { append(param: string, value: any): void; };
let formParams: { append(param: string, value: any): any; };
let useForm = false;
let convertFormParamsToString = false;
if (useForm) {
Expand Down Expand Up @@ -614,7 +614,7 @@ export class PetService implements PetServiceInterface {

const canConsumeForm = this.canConsumeForm(consumes);

let formParams: { append(param: string, value: any): void; };
let formParams: { append(param: string, value: any): any; };
let useForm = false;
let convertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ export class PetService {

const canConsumeForm = this.canConsumeForm(consumes);

let formParams: { append(param: string, value: any): void; };
let formParams: { append(param: string, value: any): any; };
let useForm = false;
let convertFormParamsToString = false;
if (useForm) {
Expand Down Expand Up @@ -485,7 +485,7 @@ export class PetService {

const canConsumeForm = this.canConsumeForm(consumes);

let formParams: { append(param: string, value: any): void; };
let formParams: { append(param: string, value: any): any; };
let useForm = false;
let convertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ export class PetService {

const canConsumeForm = this.canConsumeForm(consumes);

let formParams: { append(param: string, value: any): void; };
let formParams: { append(param: string, value: any): any; };
let useForm = false;
let convertFormParamsToString = false;
if (useForm) {
Expand Down Expand Up @@ -613,7 +613,7 @@ export class PetService {

const canConsumeForm = this.canConsumeForm(consumes);

let formParams: { append(param: string, value: any): void; };
let formParams: { append(param: string, value: any): any; };
let useForm = false;
let convertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ export class PetService {

const canConsumeForm = this.canConsumeForm(consumes);

let formParams: { append(param: string, value: any): void; };
let formParams: { append(param: string, value: any): any; };
let useForm = false;
let convertFormParamsToString = false;
if (useForm) {
Expand Down Expand Up @@ -485,7 +485,7 @@ export class PetService {

const canConsumeForm = this.canConsumeForm(consumes);

let formParams: { append(param: string, value: any): void; };
let formParams: { append(param: string, value: any): any; };
let useForm = false;
let convertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ export class PetService {

const canConsumeForm = this.canConsumeForm(consumes);

let formParams: { append(param: string, value: any): void; };
let formParams: { append(param: string, value: any): any; };
let useForm = false;
let convertFormParamsToString = false;
if (useForm) {
Expand Down Expand Up @@ -485,7 +485,7 @@ export class PetService {

const canConsumeForm = this.canConsumeForm(consumes);

let formParams: { append(param: string, value: any): void; };
let formParams: { append(param: string, value: any): any; };
let useForm = false;
let convertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ export class PetService {

const canConsumeForm = this.canConsumeForm(consumes);

let formParams: { append(param: string, value: any): void; };
let formParams: { append(param: string, value: any): any; };
let useForm = false;
let convertFormParamsToString = false;
if (useForm) {
Expand Down Expand Up @@ -487,7 +487,7 @@ export class PetService {

const canConsumeForm = this.canConsumeForm(consumes);

let formParams: { append(param: string, value: any): void; };
let formParams: { append(param: string, value: any): any; };
let useForm = false;
let convertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ export class PetService {

const canConsumeForm = this.canConsumeForm(consumes);

let formParams: { append(param: string, value: any): void; };
let formParams: { append(param: string, value: any): any; };
let useForm = false;
let convertFormParamsToString = false;
if (useForm) {
Expand Down Expand Up @@ -487,7 +487,7 @@ export class PetService {

const canConsumeForm = this.canConsumeForm(consumes);

let formParams: { append(param: string, value: any): void; };
let formParams: { append(param: string, value: any): any; };
let useForm = false;
let convertFormParamsToString = false;
// use FormData to transmit files using content-type "multipart/form-data"
Expand Down

0 comments on commit 947b0d9

Please sign in to comment.