@beamf/graphql-schema-typescript
Advanced tools
Comparing version 1.1.5 to 1.1.6
@@ -89,8 +89,8 @@ "use strict"; | ||
var customScalarType = this.options.customScalarType || {}; | ||
if (customScalarType[scalarType.name]) { | ||
return [ | ||
"export type " + this.options.typePrefix + scalarType.name + " = " + customScalarType[scalarType.name], | ||
]; | ||
var tsName = "" + this.options.typePrefix + scalarType.name; | ||
var customTsName = customScalarType[scalarType.name] || 'any'; | ||
if (customTsName !== tsName) { | ||
return ["export type " + tsName + " = " + customTsName]; | ||
} | ||
return ["export type " + this.options.typePrefix + scalarType.name + " = any"]; | ||
return []; | ||
}; | ||
@@ -97,0 +97,0 @@ SimpleTypesGenerator.prototype.generateEnumType = function (enumType) { |
{ | ||
"name": "@beamf/graphql-schema-typescript", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"description": "Generate TypeScript from GraphQL's schema type definitions", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
227757