@gqlts/cli
Version:
Generate a client sdk from your GraphQl API
9 lines • 395 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.enumType = enumType;
const comment_1 = require("../common/comment");
function enumType(type, ctx) {
const values = type.getValues().map((v) => `'${v.name}'`);
ctx.addCodeBlock(`${(0, comment_1.typeComment)(type)}export type ${type.name} = ${values.join(' | ')}`);
}
//# sourceMappingURL=enumType.js.map
;