Sha256: 6bca83e494fed2c84f9dca8fa5a29b60774cd479375787ea756bfb047dc9ceb0

Contents?: true

Size: 1.15 KB

Versions: 161

Compression:

Stored size: 1.15 KB

Contents

{"version":3,"names":["_index","require","_index2","prependToMemberExpression","member","prepend","isSuper","object","Error","memberExpression"],"sources":["../../src/modifications/prependToMemberExpression.ts"],"sourcesContent":["import { memberExpression } from \"../builders/generated/index.ts\";\nimport { isSuper } from \"../index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Prepend a node to a member expression.\n */\nexport default function prependToMemberExpression<\n  T extends Pick<t.MemberExpression, \"object\" | \"property\">,\n>(member: T, prepend: t.MemberExpression[\"object\"]): T {\n  if (isSuper(member.object)) {\n    throw new Error(\n      \"Cannot prepend node to super property access (`super.foo`).\",\n    );\n  }\n  member.object = memberExpression(prepend, member.object);\n\n  return member;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAMe,SAASE,yBAAyBA,CAE/CC,MAAS,EAAEC,OAAqC,EAAK;EACrD,IAAI,IAAAC,eAAO,EAACF,MAAM,CAACG,MAAM,CAAC,EAAE;IAC1B,MAAM,IAAIC,KAAK,CACb,6DACF,CAAC;EACH;EACAJ,MAAM,CAACG,MAAM,GAAG,IAAAE,uBAAgB,EAACJ,OAAO,EAAED,MAAM,CAACG,MAAM,CAAC;EAExD,OAAOH,MAAM;AACf","ignoreList":[]}

Version data entries

161 entries across 15 versions & 2 rubygems

Version Path
immosquare-cleaner-0.1.51 node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map
immosquare-cleaner-0.1.51 node_modules/@babel/plugin-transform-computed-properties/node_modules/@babel/template/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map
immosquare-cleaner-0.1.51 node_modules/@babel/helper-module-imports/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map
immosquare-cleaner-0.1.51 node_modules/@babel/helper-skip-transparent-expression-wrappers/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map
immosquare-cleaner-0.1.51 node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/node_modules/@babel/traverse/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map
immosquare-cleaner-0.1.51 node_modules/@babel/plugin-transform-classes/node_modules/@babel/traverse/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map
immosquare-cleaner-0.1.51 node_modules/@babel/helper-environment-visitor/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map
immosquare-cleaner-0.1.51 node_modules/@babel/helper-member-expression-to-functions/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map
immosquare-cleaner-0.1.51 node_modules/@babel/helper-remap-async-to-generator/node_modules/@babel/traverse/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map
immosquare-cleaner-0.1.51 node_modules/@babel/helper-simple-access/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map
immosquare-cleaner-0.1.51 node_modules/@babel/helper-wrap-function/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map
immosquare-cleaner-0.1.51 node_modules/@babel/helpers/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map
immosquare-cleaner-0.1.51 node_modules/@babel/plugin-transform-async-generator-functions/node_modules/@babel/traverse/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map
immosquare-cleaner-0.1.51 node_modules/@babel/plugin-transform-classes/node_modules/@babel/helper-replace-supers/node_modules/@babel/helper-member-expression-to-functions/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map
immosquare-cleaner-0.1.51 node_modules/@babel/helper-annotate-as-pure/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map
immosquare-cleaner-0.1.51 node_modules/@babel/helper-builder-binary-assignment-operator-visitor/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map
immosquare-cleaner-0.1.51 node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map
immosquare-cleaner-0.1.51 node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map
immosquare-cleaner-0.1.51 node_modules/@babel/helper-optimise-call-expression/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map
immosquare-cleaner-0.1.51 node_modules/@babel/plugin-transform-function-name/node_modules/@babel/traverse/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map