| | |
| | | validate: (0, _utils.chain)((0, _utils.assertValueType)("number"), Object.assign(function (node, key, val) { |
| | | if (1 / val < 0 || !Number.isFinite(val)) { |
| | | const error = new Error("NumericLiterals must be non-negative finite numbers. " + `You can use t.valueToNode(${val}) instead.`); |
| | | {} |
| | | } |
| | | }, { |
| | | type: "number" |
| | |
| | | attributes: { |
| | | optional: true, |
| | | validate: (0, _utils.arrayOfType)("ImportAttribute") |
| | | }, |
| | | assertions: { |
| | | deprecated: true, |
| | | optional: true, |
| | | validate: (0, _utils.arrayOfType)("ImportAttribute") |
| | | } |
| | | }; |
| | | importAttributes.assertions = { |
| | | deprecated: true, |
| | | optional: true, |
| | | validate: (0, _utils.arrayOfType)("ImportAttribute") |
| | | }; |
| | | defineType("ExportAllDeclaration", { |
| | | builder: ["source"], |
| | | builder: ["source", "attributes"], |
| | | visitor: ["source", "attributes", "assertions"], |
| | | aliases: ["Statement", "Declaration", "ImportOrExportDeclaration", "ExportDeclaration"], |
| | | fields: Object.assign({ |
| | |
| | | } |
| | | }); |
| | | defineType("ExportNamedDeclaration", { |
| | | builder: ["declaration", "specifiers", "source"], |
| | | builder: ["declaration", "specifiers", "source", "attributes"], |
| | | visitor: ["declaration", "specifiers", "source", "attributes", "assertions"], |
| | | aliases: ["Statement", "Declaration", "ImportOrExportDeclaration", "ExportDeclaration"], |
| | | fields: Object.assign({ |
| | |
| | | } |
| | | }); |
| | | defineType("ImportDeclaration", { |
| | | builder: ["specifiers", "source"], |
| | | builder: ["specifiers", "source", "attributes"], |
| | | visitor: ["specifiers", "source", "attributes", "assertions"], |
| | | aliases: ["Statement", "Declaration", "ImportOrExportDeclaration"], |
| | | fields: Object.assign({}, importAttributes, { |