1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | 'use strict';
|
11 |
|
12 | var formatGeneratedModule = function formatGeneratedModule(_ref) {
|
13 | var moduleName = _ref.moduleName,
|
14 | documentType = _ref.documentType,
|
15 | docText = _ref.docText,
|
16 | concreteText = _ref.concreteText,
|
17 | typeText = _ref.typeText,
|
18 | hash = _ref.hash,
|
19 | sourceHash = _ref.sourceHash;
|
20 | var documentTypeImport = documentType ? "import type { ".concat(documentType, " } from 'relay-runtime';") : '';
|
21 | var docTextComment = docText ? '\n/*\n' + docText.trim() + '\n*/\n' : '';
|
22 | var hashText = hash ? "\n * ".concat(hash) : '';
|
23 | return "/**\n * ".concat('@', "flow", hashText, "\n */\n\n/* eslint-disable */\n\n'use strict';\n\n/*::\n").concat(documentTypeImport, "\n").concat(typeText || '', "\n*/\n\n").concat(docTextComment, "\nconst node/*: ").concat(documentType || 'empty', "*/ = ").concat(concreteText, ";\n// prettier-ignore\n(node/*: any*/).hash = '").concat(sourceHash, "';\nmodule.exports = node;\n");
|
24 | };
|
25 |
|
26 | module.exports = formatGeneratedModule; |
\ | No newline at end of file |