yarax / swagger-to-graphql

Swagger to GraphQL API adapter
MIT License
924 stars 150 forks source link

Build issue #163

Open jzhenxing opened 4 years ago

jzhenxing commented 4 years ago

Follow this step will get a building issue.

  1. remove the package-lock.json
  2. npm i
  3. npm start

No overload matches this call. Overload 1 of 3, '(callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string', gave the following error. Argument of type '(prev: { [propertyName: string]: { description: string; type: string; }; }, propertyName: string) => { [x: string]: { description: string; type: string; } | { description: string | undefined; type: GraphQLType; }; }' is not assignable to parameter of type '(previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string'. Types of parameters 'prev' and 'previousValue' are incompatible. Type 'string' is not assignable to type '{ [propertyName: string]: { description: string; type: string; }; }'. Overload 2 of 3, '(callbackfn: (previousValue: { [propertyName: string]: { description: string; type: string; }; }, currentValue: string, currentIndex: number, array: string[]) => { [propertyName: string]: { description: string; type: string; }; }, initialValue: { ...; }): { ...; }', gave the following error. Argument of type '(prev: { [propertyName: string]: { description: string; type: string; }; }, propertyName: string) => { [x: string]: { description: string; type: string; } | { description: string | undefined; type: GraphQLType; }; }' is not assignable to parameter of type '(previousValue: { [propertyName: string]: { description: string; type: string; }; }, currentValue: string, currentIndex: number, array: string[]) => { [propertyName: string]: { description: string; type: string; }; }'. Type '{ [x: string]: { description: string; type: string; } | { description: string | undefined; type: GraphQLType; }; }' is not assignable to type '{ [propertyName: string]: { description: string; type: string; }; }'. Index signatures are incompatible. Type '{ description: string; type: string; } | { description: string | undefined; type: GraphQLType; }' is not assignable to type '{ description: string; type: string; }'. Type '{ description: string | undefined; type: GraphQLType; }' is not assignable to type '{ description: string; type: string; }'. Types of property 'description' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'.ts(2769)