Sha256: 9e3ac6539063ed5d93e2c1381f60b151e95d91c6e198a0dad3660d6353e4ea8e

Contents?: true

Size: 1.14 KB

Versions: 3

Compression:

Stored size: 1.14 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"}

Version data entries

3 entries across 1 versions & 1 rubygems

Version Path
trusty-cms-6.3.1 node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map
trusty-cms-6.3.1 node_modules/@babel/traverse/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map
trusty-cms-6.3.1 node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map