UNPKG

879 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const types_1 = require("./types");
4const dependencies_1 = require("./dependencies");
5const dependencyImports_1 = require("./dependencyImports");
6const stringDeclarations_1 = require("./stringDeclarations");
7const typePredicates_1 = require("./typePredicates");
8exports.fragmentFile = (fragment, outputPath, globalSourcePath, context) => ((dependencies) => [
9 ...dependencyImports_1.default(dependencies, outputPath, globalSourcePath, context),
10 ...stringDeclarations_1.default(fragment.fragmentName, fragment.filePath, outputPath, [], true),
11 types_1.exportDeclaration(types_1.typeAliasDeclarationForFragment(fragment)),
12 types_1.exportDeclaration(typePredicates_1.isFragmentDeclaration(fragment))
13])(dependencies_1.default(fragment.selectionSet));
14//# sourceMappingURL=fragmentFile.js.map
\No newline at end of file