
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
{"version":3,"names":["isDeclareExportDeclaration","isStatement","AnyTypeAnnotation","word","ArrayTypeAnnotation","node","print","elementType","token","BooleanTypeAnnotation","BooleanLiteralTypeAnnotation","value","NullLiteralTypeAnnotation","DeclareClass","parent","space","_interfaceish","DeclareFunction","id","typeAnnotation","predicate","semicolon","InferredPredicate","DeclaredPredicate","DeclareInterface","InterfaceDeclaration","DeclareModule","body","DeclareModuleExports","DeclareTypeAlias","TypeAlias","DeclareOpaqueType","OpaqueType","DeclareVariable","DeclareExportDeclaration","default","FlowExportDeclaration","call","DeclareExportAllDeclaration","ExportAllDeclaration","EnumDeclaration","enumExplicitType","context","name","hasExplicitType","enumBody","members","indent","newline","member","hasUnknownMembers","dedent","EnumBooleanBody","explicitType","EnumNumberBody","EnumStringBody","EnumSymbolBody","EnumDefaultedMember","enumInitializedMember","init","EnumBooleanMember","EnumNumberMember","EnumStringMember","declaration","declar","specifiers","length","printList","source","ExistsTypeAnnotation","FunctionTypeAnnotation","typeParameters","this","params","rest","type","method","returnType","FunctionTypeParam","optional","InterfaceExtends","extends","mixins","implements","_variance","variance","kind","andSeparator","InterfaceTypeAnnotation","IntersectionTypeAnnotation","printJoin","types","separator","MixedTypeAnnotation","EmptyTypeAnnotation","NullableTypeAnnotation","NumberTypeAnnotation","StringTypeAnnotation","ThisTypeAnnotation","TupleTypeAnnotation","TypeofTypeAnnotation","argument","right","TypeAnnotation","TypeParameterInstantiation","TypeParameter","bound","supertype","impltype","ObjectTypeAnnotation","exact","props","properties","callProperties","indexers","internalSlots","addNewlines","leading","statement","iterator","inexact","ObjectTypeInternalSlot","static","ObjectTypeCallProperty","ObjectTypeIndexer","key","ObjectTypeProperty","proto","ObjectTypeSpreadProperty","QualifiedTypeIdentifier","qualification","SymbolTypeAnnotation","orSeparator","UnionTypeAnnotation","TypeCastExpression","expression","Variance","VoidTypeAnnotation","IndexedAccessType","objectType","indexType","OptionalIndexedAccessType"],"sources":["../../src/generators/flow.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport { isDeclareExportDeclaration, isStatement } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport { ExportAllDeclaration } from \"./modules\";\n\nexport function AnyTypeAnnotation(this: Printer) {\n this.word(\"any\");\n}\n\nexport function ArrayTypeAnnotation(\n this: Printer,\n node: t.ArrayTypeAnnotation,\n) {\n this.print(node.elementType, node, true);\n this.token(\"[\");\n this.token(\"]\");\n}\n\nexport function BooleanTypeAnnotation(this: Printer) {\n this.word(\"boolean\");\n}\n\nexport function BooleanLiteralTypeAnnotation(\n this: Printer,\n node: t.BooleanLiteralTypeAnnotation,\n) {\n this.word(node.value ? \"true\" : \"false\");\n}\n\nexport function NullLiteralTypeAnnotation(this: Printer) {\n this.word(\"null\");\n}\n\nexport function DeclareClass(\n this: Printer,\n node: t.DeclareClass,\n parent: t.Node,\n) {\n if (!isDeclareExportDeclaration(parent)) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"class\");\n this.space();\n this._interfaceish(node);\n}\n\nexport function DeclareFunction(\n this: Printer,\n node: t.DeclareFunction,\n parent: t.Node,\n) {\n if (!isDeclareExportDeclaration(parent)) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"function\");\n this.space();\n this.print(node.id, node);\n // @ts-ignore(Babel 7 vs Babel 8) TODO(Babel 8) Remove this comment, since we'll remove the Noop node\n this.print(node.id.typeAnnotation.typeAnnotation, node);\n\n if (node.predicate) {\n this.space();\n this.print(node.predicate, node);\n }\n\n this.semicolon();\n}\n\nexport function InferredPredicate(this: Printer) {\n this.token(\"%\");\n this.word(\"checks\");\n}\n\nexport function DeclaredPredicate(this: Printer, node: t.DeclaredPredicate) {\n this.token(\"%\");\n this.word(\"checks\");\n this.token(\"(\");\n this.print(node.value, node);\n this.token(\")\");\n}\n\nexport function DeclareInterface(this: Printer, node: t.DeclareInterface) {\n this.word(\"declare\");\n this.space();\n this.InterfaceDeclaration(node);\n}\n\nexport function DeclareModule(this: Printer, node: t.DeclareModule) {\n this.word(\"declare\");\n this.space();\n this.word(\"module\");\n this.space();\n this.print(node.id, node);\n this.space();\n this.print(node.body, node);\n}\n\nexport function DeclareModuleExports(\n this: Printer,\n node: t.DeclareModuleExports,\n) {\n this.word(\"declare\");\n this.space();\n this.word(\"module\");\n this.token(\".\");\n this.word(\"exports\");\n this.print(node.typeAnnotation, node);\n}\n\nexport function DeclareTypeAlias(this: Printer, node: t.DeclareTypeAlias) {\n this.word(\"declare\");\n this.space();\n this.TypeAlias(node);\n}\n\nexport function DeclareOpaqueType(\n this: Printer,\n node: t.DeclareOpaqueType,\n parent: t.Node,\n) {\n if (!isDeclareExportDeclaration(parent)) {\n this.word(\"declare\");\n this.space();\n }\n this.OpaqueType(node);\n}\n\nexport function DeclareVariable(\n this: Printer,\n node: t.DeclareVariable,\n parent: t.Node,\n) {\n if (!isDeclareExportDeclaration(parent)) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"var\");\n this.space();\n this.print(node.id, node);\n this.print(node.id.typeAnnotation, node);\n this.semicolon();\n}\n\nexport function DeclareExportDeclaration(\n this: Printer,\n node: t.DeclareExportDeclaration,\n) {\n this.word(\"declare\");\n this.space();\n this.word(\"export\");\n this.space();\n if (node.default) {\n this.word(\"default\");\n this.space();\n }\n\n FlowExportDeclaration.call(this, node);\n}\n\nexport function DeclareExportAllDeclaration(\n this: Printer,\n node: t.DeclareExportAllDeclaration,\n) {\n this.word(\"declare\");\n this.space();\n ExportAllDeclaration.call(this, node);\n}\n\nexport function EnumDeclaration(this: Printer, node: t.EnumDeclaration) {\n const { id, body } = node;\n this.word(\"enum\");\n this.space();\n this.print(id, node);\n this.print(body, node);\n}\n\nfunction enumExplicitType(\n context: Printer,\n name: string,\n hasExplicitType: boolean,\n) {\n if (hasExplicitType) {\n context.space();\n context.word(\"of\");\n context.space();\n context.word(name);\n }\n context.space();\n}\n\nfunction enumBody(context: Printer, node: t.EnumBody) {\n const { members } = node;\n context.token(\"{\");\n context.indent();\n context.newline();\n for (const member of members) {\n context.print(member, node);\n context.newline();\n }\n if (node.hasUnknownMembers) {\n context.token(\"...\");\n context.newline();\n }\n context.dedent();\n context.token(\"}\");\n}\n\nexport function EnumBooleanBody(this: Printer, node: t.EnumBooleanBody) {\n const { explicitType } = node;\n enumExplicitType(this, \"boolean\", explicitType);\n enumBody(this, node);\n}\n\nexport function EnumNumberBody(this: Printer, node: t.EnumNumberBody) {\n const { explicitType } = node;\n enumExplicitType(this, \"number\", explicitType);\n enumBody(this, node);\n}\n\nexport function EnumStringBody(this: Printer, node: t.EnumStringBody) {\n const { explicitType } = node;\n enumExplicitType(this, \"string\", explicitType);\n enumBody(this, node);\n}\n\nexport function EnumSymbolBody(this: Printer, node: t.EnumSymbolBody) {\n enumExplicitType(this, \"symbol\", true);\n enumBody(this, node);\n}\n\nexport function EnumDefaultedMember(\n this: Printer,\n node: t.EnumDefaultedMember,\n) {\n const { id } = node;\n this.print(id, node);\n this.token(\",\");\n}\n\nfunction enumInitializedMember(\n context: Printer,\n node: t.EnumBooleanMember | t.EnumNumberMember | t.EnumStringMember,\n) {\n const { id, init } = node;\n context.print(id, node);\n context.space();\n context.token(\"=\");\n context.space();\n context.print(init, node);\n context.token(\",\");\n}\n\nexport function EnumBooleanMember(this: Printer, node: t.EnumBooleanMember) {\n enumInitializedMember(this, node);\n}\n\nexport function EnumNumberMember(this: Printer, node: t.EnumNumberMember) {\n enumInitializedMember(this, node);\n}\n\nexport function EnumStringMember(this: Printer, node: t.EnumStringMember) {\n enumInitializedMember(this, node);\n}\n\nfunction FlowExportDeclaration(\n this: Printer,\n node: t.DeclareExportDeclaration,\n) {\n if (node.declaration) {\n const declar = node.declaration;\n this.print(declar, node);\n if (!isStatement(declar)) this.semicolon();\n } else {\n this.token(\"{\");\n if (node.specifiers.length) {\n this.space();\n this.printList(node.specifiers, node);\n this.space();\n }\n this.token(\"}\");\n\n if (node.source) {\n this.space();\n this.word(\"from\");\n this.space();\n this.print(node.source, node);\n }\n\n this.semicolon();\n }\n}\n\nexport function ExistsTypeAnnotation(this: Printer) {\n this.token(\"*\");\n}\n\nexport function FunctionTypeAnnotation(\n this: Printer,\n node: t.FunctionTypeAnnotation,\n parent: t.Node | void,\n) {\n this.print(node.typeParameters, node);\n this.token(\"(\");\n\n if (node.this) {\n this.word(\"this\");\n this.token(\":\");\n this.space();\n this.print(node.this.typeAnnotation, node);\n if (node.params.length || node.rest) {\n this.token(\",\");\n this.space();\n }\n }\n\n this.printList(node.params, node);\n\n if (node.rest) {\n if (node.params.length) {\n this.token(\",\");\n this.space();\n }\n this.token(\"...\");\n this.print(node.rest, node);\n }\n\n this.token(\")\");\n\n // this node type is overloaded, not sure why but it makes it EXTREMELY annoying\n if (\n parent &&\n (parent.type === \"ObjectTypeCallProperty\" ||\n parent.type === \"ObjectTypeInternalSlot\" ||\n parent.type === \"DeclareFunction\" ||\n (parent.type === \"ObjectTypeProperty\" && parent.method))\n ) {\n this.token(\":\");\n } else {\n this.space();\n this.token(\"=>\");\n }\n\n this.space();\n this.print(node.returnType, node);\n}\n\nexport function FunctionTypeParam(this: Printer, node: t.FunctionTypeParam) {\n this.print(node.name, node);\n if (node.optional) this.token(\"?\");\n if (node.name) {\n this.token(\":\");\n this.space();\n }\n this.print(node.typeAnnotation, node);\n}\n\nexport function InterfaceExtends(this: Printer, node: t.InterfaceExtends) {\n this.print(node.id, node);\n this.print(node.typeParameters, node, true);\n}\n\nexport {\n InterfaceExtends as ClassImplements,\n InterfaceExtends as GenericTypeAnnotation,\n};\n\nexport function _interfaceish(\n this: Printer,\n node: t.InterfaceDeclaration | t.DeclareInterface | t.DeclareClass,\n) {\n this.print(node.id, node);\n this.print(node.typeParameters, node);\n if (node.extends?.length) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.printList(node.extends, node);\n }\n if (node.mixins && node.mixins.length) {\n this.space();\n this.word(\"mixins\");\n this.space();\n this.printList(node.mixins, node);\n }\n if (node.implements && node.implements.length) {\n this.space();\n this.word(\"implements\");\n this.space();\n this.printList(node.implements, node);\n }\n this.space();\n this.print(node.body, node);\n}\n\nexport function _variance(\n this: Printer,\n node:\n | t.TypeParameter\n | t.ObjectTypeIndexer\n | t.ObjectTypeProperty\n | t.ClassProperty\n | t.ClassPrivateProperty\n | t.ClassAccessorProperty,\n) {\n if (node.variance) {\n if (node.variance.kind === \"plus\") {\n this.token(\"+\");\n } else if (node.variance.kind === \"minus\") {\n this.token(\"-\");\n }\n }\n}\n\nexport function InterfaceDeclaration(\n this: Printer,\n node: t.InterfaceDeclaration | t.DeclareInterface,\n) {\n this.word(\"interface\");\n this.space();\n this._interfaceish(node);\n}\n\nfunction andSeparator(this: Printer) {\n this.space();\n this.token(\"&\");\n this.space();\n}\n\nexport function InterfaceTypeAnnotation(\n this: Printer,\n node: t.InterfaceTypeAnnotation,\n) {\n this.word(\"interface\");\n if (node.extends && node.extends.length) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.printList(node.extends, node);\n }\n this.space();\n this.print(node.body, node);\n}\n\nexport function IntersectionTypeAnnotation(\n this: Printer,\n node: t.IntersectionTypeAnnotation,\n) {\n this.printJoin(node.types, node, { separator: andSeparator });\n}\n\nexport function MixedTypeAnnotation(this: Printer) {\n this.word(\"mixed\");\n}\n\nexport function EmptyTypeAnnotation(this: Printer) {\n this.word(\"empty\");\n}\n\nexport function NullableTypeAnnotation(\n this: Printer,\n node: t.NullableTypeAnnotation,\n) {\n this.token(\"?\");\n this.print(node.typeAnnotation, node);\n}\n\nexport {\n NumericLiteral as NumberLiteralTypeAnnotation,\n StringLiteral as StringLiteralTypeAnnotation,\n} from \"./types\";\n\nexport function NumberTypeAnnotation(this: Printer) {\n this.word(\"number\");\n}\n\nexport function StringTypeAnnotation(this: Printer) {\n this.word(\"string\");\n}\n\nexport function ThisTypeAnnotation(this: Printer) {\n this.word(\"this\");\n}\n\nexport function TupleTypeAnnotation(\n this: Printer,\n node: t.TupleTypeAnnotation,\n) {\n this.token(\"[\");\n this.printList(node.types, node);\n this.token(\"]\");\n}\n\nexport function TypeofTypeAnnotation(\n this: Printer,\n node: t.TypeofTypeAnnotation,\n) {\n this.word(\"typeof\");\n this.space();\n this.print(node.argument, node);\n}\n\nexport function TypeAlias(\n this: Printer,\n node: t.TypeAlias | t.DeclareTypeAlias,\n) {\n this.word(\"type\");\n this.space();\n this.print(node.id, node);\n this.print(node.typeParameters, node);\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.right, node);\n this.semicolon();\n}\n\nexport function TypeAnnotation(this: Printer, node: t.TypeAnnotation) {\n this.token(\":\");\n this.space();\n // @ts-expect-error todo(flow->ts) can this be removed? `.optional` looks to be not existing property\n if (node.optional) this.token(\"?\");\n this.print(node.typeAnnotation, node);\n}\n\nexport function TypeParameterInstantiation(\n this: Printer,\n node: t.TypeParameterInstantiation,\n): void {\n this.token(\"<\");\n this.printList(node.params, node, {});\n this.token(\">\");\n}\n\nexport { TypeParameterInstantiation as TypeParameterDeclaration };\n\nexport function TypeParameter(this: Printer, node: t.TypeParameter) {\n this._variance(node);\n\n this.word(node.name);\n\n if (node.bound) {\n this.print(node.bound, node);\n }\n\n if (node.default) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.default, node);\n }\n}\n\nexport function OpaqueType(\n this: Printer,\n node: t.OpaqueType | t.DeclareOpaqueType,\n) {\n this.word(\"opaque\");\n this.space();\n this.word(\"type\");\n this.space();\n this.print(node.id, node);\n this.print(node.typeParameters, node);\n if (node.supertype) {\n this.token(\":\");\n this.space();\n this.print(node.supertype, node);\n }\n\n if (node.impltype) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.impltype, node);\n }\n this.semicolon();\n}\n\nexport function ObjectTypeAnnotation(\n this: Printer,\n node: t.ObjectTypeAnnotation,\n) {\n if (node.exact) {\n this.token(\"{|\");\n } else {\n this.token(\"{\");\n }\n\n // TODO: remove the array fallbacks and instead enforce the types to require an array\n const props = [\n ...node.properties,\n ...(node.callProperties || []),\n ...(node.indexers || []),\n ...(node.internalSlots || []),\n ];\n\n if (props.length) {\n this.newline();\n\n this.space();\n\n this.printJoin(props, node, {\n addNewlines(leading) {\n if (leading && !props[0]) return 1;\n },\n indent: true,\n statement: true,\n iterator: () => {\n if (props.length !== 1 || node.inexact) {\n this.token(\",\");\n this.space();\n }\n },\n });\n\n this.space();\n }\n\n if (node.inexact) {\n this.indent();\n this.token(\"...\");\n if (props.length) {\n this.newline();\n }\n this.dedent();\n }\n\n if (node.exact) {\n this.token(\"|}\");\n } else {\n this.token(\"}\");\n }\n}\n\nexport function ObjectTypeInternalSlot(\n this: Printer,\n node: t.ObjectTypeInternalSlot,\n) {\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n this.token(\"[\");\n this.token(\"[\");\n this.print(node.id, node);\n this.token(\"]\");\n this.token(\"]\");\n if (node.optional) this.token(\"?\");\n if (!node.method) {\n this.token(\":\");\n this.space();\n }\n this.print(node.value, node);\n}\n\nexport function ObjectTypeCallProperty(\n this: Printer,\n node: t.ObjectTypeCallProperty,\n) {\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n this.print(node.value, node);\n}\n\nexport function ObjectTypeIndexer(this: Printer, node: t.ObjectTypeIndexer) {\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n this._variance(node);\n this.token(\"[\");\n if (node.id) {\n this.print(node.id, node);\n this.token(\":\");\n this.space();\n }\n this.print(node.key, node);\n this.token(\"]\");\n this.token(\":\");\n this.space();\n this.print(node.value, node);\n}\n\nexport function ObjectTypeProperty(this: Printer, node: t.ObjectTypeProperty) {\n if (node.proto) {\n this.word(\"proto\");\n this.space();\n }\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n if (node.kind === \"get\" || node.kind === \"set\") {\n this.word(node.kind);\n this.space();\n }\n this._variance(node);\n this.print(node.key, node);\n if (node.optional) this.token(\"?\");\n if (!node.method) {\n this.token(\":\");\n this.space();\n }\n this.print(node.value, node);\n}\n\nexport function ObjectTypeSpreadProperty(\n this: Printer,\n node: t.ObjectTypeSpreadProperty,\n) {\n this.token(\"...\");\n this.print(node.argument, node);\n}\n\nexport function QualifiedTypeIdentifier(\n this: Printer,\n node: t.QualifiedTypeIdentifier,\n) {\n this.print(node.qualification, node);\n this.token(\".\");\n this.print(node.id, node);\n}\n\nexport function SymbolTypeAnnotation(this: Printer) {\n this.word(\"symbol\");\n}\n\nfunction orSeparator(this: Printer) {\n this.space();\n this.token(\"|\");\n this.space();\n}\n\nexport function UnionTypeAnnotation(\n this: Printer,\n node: t.UnionTypeAnnotation,\n) {\n this.printJoin(node.types, node, { separator: orSeparator });\n}\n\nexport function TypeCastExpression(this: Printer, node: t.TypeCastExpression) {\n this.token(\"(\");\n this.print(node.expression, node);\n this.print(node.typeAnnotation, node);\n this.token(\")\");\n}\n\nexport function Variance(this: Printer, node: t.Variance) {\n if (node.kind === \"plus\") {\n this.token(\"+\");\n } else {\n this.token(\"-\");\n }\n}\n\nexport function VoidTypeAnnotation(this: Printer) {\n this.word(\"void\");\n}\n\nexport function IndexedAccessType(this: Printer, node: t.IndexedAccessType) {\n this.print(node.objectType, node, true);\n this.token(\"[\");\n this.print(node.indexType, node);\n this.token(\"]\");\n}\n\nexport function OptionalIndexedAccessType(\n this: Printer,\n node: t.OptionalIndexedAccessType,\n) {\n this.print(node.objectType, node);\n if (node.optional) {\n this.token(\"?.\");\n }\n this.token(\"[\");\n this.print(node.indexType, node);\n this.token(\"]\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;AAidA;;;EAndSA,0B;EAA4BC;;;AAI9B,SAASC,iBAAT,GAA0C;EAC/C,KAAKC,IAAL,CAAU,KAAV;AACD;;AAEM,SAASC,mBAAT,CAELC,IAFK,EAGL;EACA,KAAKC,KAAL,CAAWD,IAAI,CAACE,WAAhB,EAA6BF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