| 1 | import type { Filescip-typescript npm @babel/core 7.20.12 src/transformation/file/`file.ts`/File# } from "@babel/core"scip-typescript npm @babel/core 7.20.12 src/`index.ts`/; |
| 2 | import environmentVisitorscip-typescript npm @babel/helper-environment-visitor 7.18.9 src/`index.ts`/visitor. from "@babel/helper-environment-visitor"scip-typescript npm @babel/helper-environment-visitor 7.18.9 src/`index.ts`/; |
| 3 | import memberExpressionToFunctionsscip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/memberExpressionToFunctions(). from "@babel/helper-member-expression-to-functions"scip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/; |
| 4 | import type { HandlerStatescip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/HandlerState# } from "@babel/helper-member-expression-to-functions"scip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/; |
| 5 | import optimiseCallscip-typescript npm @babel/helper-optimise-call-expression 7.18.6 src/`index.ts`/optimiseCallExpression(). from "@babel/helper-optimise-call-expression"scip-typescript npm @babel/helper-optimise-call-expression 7.18.6 src/`index.ts`/; |
| 6 | import template from "@babel/template"scip-typescript npm @babel/template 7.20.7 src/`index.ts`/; |
| 7 | import traversescip-typescript npm @babel/traverse 7.20.13 src/`index.ts`/traverse(). from "@babel/traverse"scip-typescript npm @babel/traverse 7.20.13 src/`index.ts`/; |
| 8 | import type { NodePathscip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath#, Scopescip-typescript npm @babel/traverse 7.20.13 src/scope/`index.ts`/Scope# } from "@babel/traverse"scip-typescript npm @babel/traverse 7.20.13 src/`index.ts`/; |
| 9 | import { |
| 10 | assignmentExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/assignmentExpression()., |
| 11 | booleanLiteralscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/booleanLiteral()., |
| 12 | callExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/callExpression()., |
| 13 | cloneNodescip-typescript npm @babel/types 7.20.7 src/clone/`cloneNode.ts`/cloneNode()., |
| 14 | identifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/identifier()., |
| 15 | memberExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/memberExpression()., |
| 16 | sequenceExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/sequenceExpression()., |
| 17 | stringLiteralscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/stringLiteral()., |
| 18 | thisExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/thisExpression()., |
| 19 | } from "@babel/types"scip-typescript npm @babel/types 7.20.7 src/`index.ts`/; |
| 20 | import type * as tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/ from "@babel/types"scip-typescript npm @babel/types 7.20.7 src/`index.ts`/; |
| 21 | |
| 22 | // TODO (Babel 8): Don't export this. |
| 23 | export { |
| 24 | default as environmentVisitorscip-typescript npm @babel/helper-environment-visitor 7.18.9 src/`index.ts`/visitor., |
| 25 | skipAllButComputedKeyscip-typescript npm @babel/helper-environment-visitor 7.18.9 src/`index.ts`/skipAllButComputedKey()., |
| 26 | } from "@babel/helper-environment-visitor"scip-typescript npm @babel/helper-environment-visitor 7.18.9 src/`index.ts`/; |
| 27 | |
| 28 | type ThisRefscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ThisRef# = |
| 29 | | { |
| 30 | memo: tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.AssignmentExpressionscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/AssignmentExpression#; |
| 31 | this: tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.Identifierscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Identifier#; |
| 32 | } |
| 33 | | { this: tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.ThisExpressionscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/ThisExpression# }; |
| 34 | /** |
| 35 | * Creates an expression which result is the proto of objectRef. |
| 36 | * |
| 37 | * @example <caption>isStatic === true</caption> |
| 38 | * |
| 39 | * helpers.getPrototypeOf(CLASS) |
| 40 | * |
| 41 | * @example <caption>isStatic === false</caption> |
| 42 | * |
| 43 | * helpers.getPrototypeOf(CLASS.prototype) |
| 44 | */ |
| 45 | function getPrototypeOfExpressionscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/getPrototypeOfExpression().( |
| 46 | objectRefscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/getPrototypeOfExpression().(objectRef): tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.Identifierscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Identifier#, |
| 47 | isStaticscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/getPrototypeOfExpression().(isStatic): boolean, |
| 48 | filescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/getPrototypeOfExpression().(file): Filescip-typescript npm @babel/core 7.20.12 src/transformation/file/`file.ts`/File#, |
| 49 | isPrivateMethodscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/getPrototypeOfExpression().(isPrivateMethod): boolean, |
| 50 | ) { |
| 51 | objectRefscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/getPrototypeOfExpression().(objectRef) = cloneNodescip-typescript npm @babel/types 7.20.7 src/clone/`cloneNode.ts`/cloneNode().(objectRefscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/getPrototypeOfExpression().(objectRef)); |
| 52 | const targetRef = |
| 53 | isStaticscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/getPrototypeOfExpression().(isStatic) || isPrivateMethodscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/getPrototypeOfExpression().(isPrivateMethod) |
| 54 | ? objectRefscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/getPrototypeOfExpression().(objectRef) |
| 55 | : memberExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/memberExpression().(objectRefscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/getPrototypeOfExpression().(objectRef), identifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/identifier().("prototype")); |
| 56 | |
| 57 | return callExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/callExpression().(filescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/getPrototypeOfExpression().(file).addHelperscip-typescript npm @babel/core 7.20.12 src/transformation/file/`file.ts`/File#addHelper().("getPrototypeOf"), [targetRef]); |
| 58 | } |
| 59 | |
| 60 | const visitorscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/visitor. = traversescip-typescript npm @babel/traverse 7.20.13 src/`index.ts`/traverse()..visitors.mergescip-typescript npm @babel/traverse 7.20.13 src/`visitors.ts`/merge().< |
| 61 | HandlerStatescip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/HandlerState#<ReplaceStatescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceState#> & ReplaceStatescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceState# |
| 62 | >([ |
| 63 | environmentVisitorscip-typescript npm @babel/helper-environment-visitor 7.18.9 src/`index.ts`/visitor., |
| 64 | { |
| 65 | Super(path, state) { |
| 66 | const { nodescip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath#node., parentPathscip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath#parentPath. } = path; |
| 67 | if (!parentPath.isMemberExpressionscip-typescript npm @babel/traverse 7.20.13 src/path/generated/`validators.d.ts`/BaseNodePathValidators#isMemberExpression().({ objectscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/object0:: node })) return; |
| 68 | state.handlescip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/HandlerState#handle().(parentPath); |
| 69 | }, |
| 70 | }, |
| 71 | ]); |
| 72 | |
| 73 | const unshadowSuperBindingVisitorscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/unshadowSuperBindingVisitor. = traversescip-typescript npm @babel/traverse 7.20.13 src/`index.ts`/traverse()..visitors.mergescip-typescript npm @babel/traverse 7.20.13 src/`visitors.ts`/merge().<{ |
| 74 | refName: string; |
| 75 | }>([ |
| 76 | environmentVisitorscip-typescript npm @babel/helper-environment-visitor 7.18.9 src/`index.ts`/visitor., |
| 77 | { |
| 78 | Scopablescip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Aliases#Scopable.(path, { refName }) { |
| 79 | // https://github.com/Zzzen/babel/pull/1#pullrequestreview-564833183 |
| 80 | const binding = path.scopescip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath#scope..getOwnBindingscip-typescript npm @babel/traverse 7.20.13 src/scope/`index.ts`/Scope#getOwnBinding().(refName); |
| 81 | if (binding && binding.identifierscip-typescript npm @babel/traverse 7.20.13 src/scope/`binding.ts`/Binding#identifier..namescip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Identifier#name. === refName) { |
| 82 | path.scopescip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath#scope..renamescip-typescript npm @babel/traverse 7.20.13 src/scope/`index.ts`/Scope#rename().(refName); |
| 83 | } |
| 84 | }, |
| 85 | }, |
| 86 | ]); |
| 87 | |
| 88 | type SharedStatescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SharedState# = { |
| 89 | filescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SharedState#typeLiteral72:file.: Filescip-typescript npm @babel/core 7.20.12 src/transformation/file/`file.ts`/File#; |
| 90 | scopescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SharedState#typeLiteral72:scope.: Scopescip-typescript npm @babel/traverse 7.20.13 src/scope/`index.ts`/Scope#; |
| 91 | isDerivedConstructorscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SharedState#typeLiteral72:isDerivedConstructor.: boolean; |
| 92 | isStaticscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SharedState#typeLiteral72:isStatic.: boolean; |
| 93 | isPrivateMethodscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SharedState#typeLiteral72:isPrivateMethod.: boolean; |
| 94 | getObjectRefscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SharedState#typeLiteral72:getObjectRef.: () => tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.Identifierscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Identifier#; |
| 95 | getSuperRefscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SharedState#typeLiteral72:getSuperRef.: () => tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.Identifierscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Identifier#; |
| 96 | // we dont need boundGet here, but memberExpressionToFunctions handler needs it. |
| 97 | boundGetscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SharedState#typeLiteral72:boundGet.: HandlerStatescip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/HandlerState#["get"scip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/Handler#get().]; |
| 98 | }; |
| 99 | |
| 100 | type Handlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/Handler# = HandlerStatescip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/HandlerState#<SharedStatescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SharedState#> & SharedStatescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SharedState#; |
| 101 | type SuperMemberscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SuperMember# = NodePathscip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath#< |
| 102 | | tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.MemberExpressionscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/MemberExpression# & { |
| 103 | object: tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.Superscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Super#; |
| 104 | property: Excludescip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/Exclude#<tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.MemberExpressionscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/MemberExpression#["property"scip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/MemberExpression#property.], tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.PrivateNamescip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/PrivateName#>; |
| 105 | } |
| 106 | >; |
| 107 | |
| 108 | interface SpecHandlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler# |
| 109 | extends Pickscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/Pick#< |
| 110 | Handlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/Handler#, |
| 111 | | "memoise" |
| 112 | | "get" |
| 113 | | "set" |
| 114 | | "destructureSet" |
| 115 | | "call" |
| 116 | | "optionalCall" |
| 117 | | "delete" |
| 118 | > { |
| 119 | _getscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#_get().( |
| 120 | thisscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#_get().(this): Handlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/Handler# & SpecHandlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#, |
| 121 | superMemberscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#_get().(superMember): SuperMemberscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SuperMember#, |
| 122 | thisRefsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#_get().(thisRefs): ThisRefscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ThisRef#, |
| 123 | ): tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.CallExpressionscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/CallExpression#; |
| 124 | _getThisRefsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#_getThisRefs().(): ThisRefscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ThisRef#; |
| 125 | propscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#prop().(thisscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#prop().(this): Handlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/Handler# & SpecHandlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#, superMemberscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#prop().(superMember): SuperMemberscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SuperMember#): tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.Expressionscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Expression#; |
| 126 | } |
| 127 | |
| 128 | const specHandlersscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/specHandlers.: SpecHandlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler# = { |
| 129 | memoisescip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/Handler#memoise().( |
| 130 | this: Handlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/Handler# & SpecHandlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#, |
| 131 | superMember: SuperMemberscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SuperMember#, |
| 132 | count: number, |
| 133 | ) { |
| 134 | const { scopescip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath#scope., nodescip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath#node. } = superMember; |
| 135 | const { computedscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/MemberExpression#computed., propertyscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/MemberExpression#property. } = node; |
| 136 | if (!computed) { |
| 137 | return; |
| 138 | } |
| 139 | |
| 140 | const memo = scope.maybeGenerateMemoisedscip-typescript npm @babel/traverse 7.20.13 src/scope/`index.ts`/Scope#maybeGenerateMemoised().(property); |
| 141 | if (!memo) { |
| 142 | return; |
| 143 | } |
| 144 | |
| 145 | this.memoiserscip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/HandlerState#memoiser..setscip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/AssignmentMemoiser#set().(property, memo, count); |
| 146 | }, |
| 147 | |
| 148 | propscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#prop().(this: Handlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/Handler# & SpecHandlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#, superMember: SuperMemberscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SuperMember#) { |
| 149 | const { computedscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/MemberExpression#computed., propertyscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/MemberExpression#property. } = superMember.nodescip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath#node.; |
| 150 | if (this.memoiserscip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/HandlerState#memoiser..hasscip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/AssignmentMemoiser#has().(property)) { |
| 151 | return cloneNodescip-typescript npm @babel/types 7.20.7 src/clone/`cloneNode.ts`/cloneNode().(this.memoiserscip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/HandlerState#memoiser..getscip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/AssignmentMemoiser#get().(property)); |
| 152 | } |
| 153 | |
| 154 | if (computed) { |
| 155 | return cloneNodescip-typescript npm @babel/types 7.20.7 src/clone/`cloneNode.ts`/cloneNode().(property); |
| 156 | } |
| 157 | |
| 158 | return stringLiteralscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/stringLiteral().((property as tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.Identifierscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Identifier#).namescip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Identifier#name.); |
| 159 | }, |
| 160 | |
| 161 | getscip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/Handler#get().(this: Handlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/Handler# & SpecHandlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#, superMember: SuperMemberscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SuperMember#) { |
| 162 | return this._getscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#_get().(superMember, this._getThisRefsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#_getThisRefs().()); |
| 163 | }, |
| 164 | |
| 165 | _getscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#_get().( |
| 166 | this: Handlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/Handler# & SpecHandlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#, |
| 167 | superMember: SuperMemberscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SuperMember#, |
| 168 | thisRefs: ThisRefscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ThisRef#, |
| 169 | ) { |
| 170 | const proto = getPrototypeOfExpressionscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/getPrototypeOfExpression().( |
| 171 | this.getObjectRefscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SharedState#typeLiteral72:getObjectRef.(), |
| 172 | this.isStaticscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SharedState#typeLiteral72:isStatic., |
| 173 | this.filescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SharedState#typeLiteral72:file., |
| 174 | this.isPrivateMethodscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SharedState#typeLiteral72:isPrivateMethod., |
| 175 | ); |
| 176 | return callExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/callExpression().(this.filescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SharedState#typeLiteral72:file..addHelperscip-typescript npm @babel/core 7.20.12 src/transformation/file/`file.ts`/File#addHelper().("get"), [ |
| 177 | // @ts-expect-error memo does not exist when this.isDerivedConstructor is false |
| 178 | thisRefs.memo ? sequenceExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/sequenceExpression().([thisRefs.memo, proto]) : proto, |
| 179 | this.propscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#prop().(superMember), |
| 180 | thisRefs.this, |
| 181 | ]); |
| 182 | }, |
| 183 | |
| 184 | _getThisRefsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#_getThisRefs().(this: Handlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/Handler# & SpecHandlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#): ThisRefscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ThisRef# { |
| 185 | if (!this.isDerivedConstructorscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SharedState#typeLiteral72:isDerivedConstructor.) { |
| 186 | return { this: thisExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/thisExpression().() }; |
| 187 | } |
| 188 | const thisRef = this.scopescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SharedState#typeLiteral72:scope..generateDeclaredUidIdentifierscip-typescript npm @babel/traverse 7.20.13 src/scope/`index.ts`/Scope#generateDeclaredUidIdentifier().("thisSuper"); |
| 189 | return { |
| 190 | memoscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/memo0:: assignmentExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/assignmentExpression().("=", thisRef, thisExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/thisExpression().()), |
| 191 | this: cloneNodescip-typescript npm @babel/types 7.20.7 src/clone/`cloneNode.ts`/cloneNode().(thisRef), |
| 192 | }; |
| 193 | }, |
| 194 | |
| 195 | setscip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/Handler#set().( |
| 196 | this: Handlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/Handler# & SpecHandlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#, |
| 197 | superMember: SuperMemberscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SuperMember#, |
| 198 | value: tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.Expressionscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Expression#, |
| 199 | ) { |
| 200 | const thisRefs = this._getThisRefsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#_getThisRefs().(); |
| 201 | const proto = getPrototypeOfExpressionscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/getPrototypeOfExpression().( |
| 202 | this.getObjectRefscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SharedState#typeLiteral72:getObjectRef.(), |
| 203 | this.isStaticscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SharedState#typeLiteral72:isStatic., |
| 204 | this.filescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SharedState#typeLiteral72:file., |
| 205 | this.isPrivateMethodscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SharedState#typeLiteral72:isPrivateMethod., |
| 206 | ); |
| 207 | return callExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/callExpression().(this.filescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SharedState#typeLiteral72:file..addHelperscip-typescript npm @babel/core 7.20.12 src/transformation/file/`file.ts`/File#addHelper().("set"), [ |
| 208 | // @ts-expect-error memo does not exist when this.isDerivedConstructor is false |
| 209 | thisRefs.memo ? sequenceExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/sequenceExpression().([thisRefs.memo, proto]) : proto, |
| 210 | this.propscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#prop().(superMember), |
| 211 | value, |
| 212 | thisRefs.this, |
| 213 | booleanLiteralscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/booleanLiteral().(superMember.isInStrictModescip-typescript npm @babel/traverse 7.20.13 src/path/`introspection.ts`/isInStrictMode().()), |
| 214 | ]); |
| 215 | }, |
| 216 | |
| 217 | destructureSetscip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/Handler#destructureSet().(this: Handlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/Handler# & SpecHandlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#, superMember: SuperMemberscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SuperMember#) { |
| 218 | throw superMember.buildCodeFrameErrorscip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath#buildCodeFrameError().( |
| 219 | `Destructuring to a super field is not supported yet.`, |
| 220 | ); |
| 221 | }, |
| 222 | |
| 223 | callscip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/Handler#call().( |
| 224 | this: Handlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/Handler# & SpecHandlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#, |
| 225 | superMember: SuperMemberscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SuperMember#, |
| 226 | args: tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.CallExpressionscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/CallExpression#["arguments"scip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/CallExpression#arguments.], |
| 227 | ) { |
| 228 | const thisRefs = this._getThisRefsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#_getThisRefs().(); |
| 229 | return optimiseCallscip-typescript npm @babel/helper-optimise-call-expression 7.18.6 src/`index.ts`/optimiseCallExpression().( |
| 230 | this._getscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#_get().(superMember, thisRefs), |
| 231 | cloneNodescip-typescript npm @babel/types 7.20.7 src/clone/`cloneNode.ts`/cloneNode().(thisRefs.this), |
| 232 | args, |
| 233 | false, |
| 234 | ); |
| 235 | }, |
| 236 | |
| 237 | optionalCallscip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/Handler#optionalCall().( |
| 238 | this: Handlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/Handler# & SpecHandlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#, |
| 239 | superMember: SuperMemberscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SuperMember#, |
| 240 | args: tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.CallExpressionscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/CallExpression#["arguments"scip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/CallExpression#arguments.], |
| 241 | ) { |
| 242 | const thisRefs = this._getThisRefsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#_getThisRefs().(); |
| 243 | return optimiseCallscip-typescript npm @babel/helper-optimise-call-expression 7.18.6 src/`index.ts`/optimiseCallExpression().( |
| 244 | this._getscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#_get().(superMember, thisRefs), |
| 245 | cloneNodescip-typescript npm @babel/types 7.20.7 src/clone/`cloneNode.ts`/cloneNode().(thisRefs.this), |
| 246 | args, |
| 247 | true, |
| 248 | ); |
| 249 | }, |
| 250 | |
| 251 | deletescip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/Handler#delete().(this: Handlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/Handler# & SpecHandlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#, superMember: SuperMemberscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SuperMember#) { |
| 252 | if (superMember.nodescip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath#node..computedscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/MemberExpression#computed.) { |
| 253 | return sequenceExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/sequenceExpression().([ |
| 254 | callExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/callExpression().(this.filescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SharedState#typeLiteral72:file..addHelperscip-typescript npm @babel/core 7.20.12 src/transformation/file/`file.ts`/File#addHelper().("toPropertyKey"), [ |
| 255 | cloneNodescip-typescript npm @babel/types 7.20.7 src/clone/`cloneNode.ts`/cloneNode().(superMember.nodescip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath#node..propertyscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/MemberExpression#property.), |
| 256 | ]), |
| 257 | template.expressionscip-typescript npm @babel/template 7.20.7 src/`index.ts`/expression0:.astscip-typescript npm @babel/template 7.20.7 src/`builder.ts`/TemplateBuilder#typeLiteral0:ast.` |
| 258 | function () { throw new ReferenceError("'delete super[expr]' is invalid"); }() |
| 259 | `, |
| 260 | ]); |
| 261 | } else { |
| 262 | return template.expressionscip-typescript npm @babel/template 7.20.7 src/`index.ts`/expression0:.astscip-typescript npm @babel/template 7.20.7 src/`builder.ts`/TemplateBuilder#typeLiteral0:ast.` |
| 263 | function () { throw new ReferenceError("'delete super.prop' is invalid"); }() |
| 264 | `; |
| 265 | } |
| 266 | }, |
| 267 | }; |
| 268 | |
| 269 | const looseHandlersscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/looseHandlers. = { |
| 270 | ...specHandlersscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/specHandlers., |
| 271 | |
| 272 | prop(this: Handlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/Handler# & typeof specHandlersscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/specHandlers., superMember: SuperMemberscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SuperMember#) { |
| 273 | const { propertyscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/MemberExpression#property. } = superMember.nodescip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath#node.; |
| 274 | if (this.memoiserscip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/HandlerState#memoiser..hasscip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/AssignmentMemoiser#has().(property)) { |
| 275 | return cloneNodescip-typescript npm @babel/types 7.20.7 src/clone/`cloneNode.ts`/cloneNode().(this.memoiserscip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/HandlerState#memoiser..getscip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/AssignmentMemoiser#get().(property)); |
| 276 | } |
| 277 | |
| 278 | return cloneNodescip-typescript npm @babel/types 7.20.7 src/clone/`cloneNode.ts`/cloneNode().(property); |
| 279 | }, |
| 280 | |
| 281 | get(this: Handlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/Handler# & typeof specHandlersscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/specHandlers., superMember: SuperMemberscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SuperMember#) { |
| 282 | const { isStaticscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SharedState#typeLiteral72:isStatic., getSuperRefscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SharedState#typeLiteral72:getSuperRef. } = this; |
| 283 | const { computedscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/MemberExpression#computed. } = superMember.nodescip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath#node.; |
| 284 | const prop = this.propscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#prop().(superMember); |
| 285 | |
| 286 | let object; |
| 287 | if (isStatic) { |
| 288 | object = |
| 289 | getSuperRef() ?? |
| 290 | memberExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/memberExpression().(identifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/identifier().("Function"), identifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/identifier().("prototype")); |
| 291 | } else { |
| 292 | object = memberExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/memberExpression().( |
| 293 | getSuperRef() ?? identifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/identifier().("Object"), |
| 294 | identifierscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/identifier().("prototype"), |
| 295 | ); |
| 296 | } |
| 297 | |
| 298 | return memberExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/memberExpression().(object, prop, computed); |
| 299 | }, |
| 300 | |
| 301 | set( |
| 302 | this: Handlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/Handler# & typeof specHandlersscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/specHandlers., |
| 303 | superMember: SuperMemberscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SuperMember#, |
| 304 | value: tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.Expressionscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Expression#, |
| 305 | ) { |
| 306 | const { computedscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/MemberExpression#computed. } = superMember.nodescip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath#node.; |
| 307 | const prop = this.propscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#prop().(superMember); |
| 308 | |
| 309 | return assignmentExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/assignmentExpression().( |
| 310 | "=", |
| 311 | memberExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/memberExpression().(thisExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/thisExpression().(), prop, computed), |
| 312 | value, |
| 313 | ); |
| 314 | }, |
| 315 | |
| 316 | destructureSet( |
| 317 | this: Handlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/Handler# & typeof specHandlersscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/specHandlers., |
| 318 | superMember: SuperMemberscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SuperMember#, |
| 319 | ) { |
| 320 | const { computedscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/MemberExpression#computed. } = superMember.nodescip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath#node.; |
| 321 | const prop = this.propscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SpecHandler#prop().(superMember); |
| 322 | |
| 323 | return memberExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/memberExpression().(thisExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/thisExpression().(), prop, computed); |
| 324 | }, |
| 325 | |
| 326 | call( |
| 327 | this: Handlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/Handler# & typeof specHandlersscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/specHandlers., |
| 328 | superMember: SuperMemberscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SuperMember#, |
| 329 | args: tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.CallExpressionscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/CallExpression#["arguments"scip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/CallExpression#arguments.], |
| 330 | ) { |
| 331 | return optimiseCallscip-typescript npm @babel/helper-optimise-call-expression 7.18.6 src/`index.ts`/optimiseCallExpression().(this.getscip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/Handler#get().(superMember), thisExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/thisExpression().(), args, false); |
| 332 | }, |
| 333 | |
| 334 | optionalCall( |
| 335 | this: Handlerscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/Handler# & typeof specHandlersscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/specHandlers., |
| 336 | superMember: SuperMemberscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/SuperMember#, |
| 337 | args: tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.CallExpressionscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/CallExpression#["arguments"scip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/CallExpression#arguments.], |
| 338 | ) { |
| 339 | return optimiseCallscip-typescript npm @babel/helper-optimise-call-expression 7.18.6 src/`index.ts`/optimiseCallExpression().(this.getscip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/Handler#get().(superMember), thisExpressionscip-typescript npm @babel/types 7.20.7 src/builders/generated/`index.ts`/thisExpression().(), args, true); |
| 340 | }, |
| 341 | }; |
| 342 | |
| 343 | type ReplaceSupersOptionsBasescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupersOptionsBase# = { |
| 344 | methodPathscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupersOptionsBase#typeLiteral215:methodPath.: NodePathscip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath#< |
| 345 | | tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.ClassMethodscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/ClassMethod# |
| 346 | | tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.ClassPropertyscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/ClassProperty# |
| 347 | | tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.ObjectMethodscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/ObjectMethod# |
| 348 | | tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.ClassPrivateMethodscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/ClassPrivateMethod# |
| 349 | | tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.ClassPrivatePropertyscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/ClassPrivateProperty# |
| 350 | | tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.StaticBlockscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/StaticBlock# |
| 351 | >; |
| 352 | constantSuperscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupersOptionsBase#typeLiteral215:constantSuper.?: boolean; |
| 353 | filescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupersOptionsBase#typeLiteral215:file.: Filescip-typescript npm @babel/core 7.20.12 src/transformation/file/`file.ts`/File#; |
| 354 | // objectRef might have been shadowed in child scopes, |
| 355 | // in that case, we need to rename related variables. |
| 356 | refToPreservescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupersOptionsBase#typeLiteral215:refToPreserve.?: tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.Identifierscip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Identifier#; |
| 357 | }; |
| 358 | |
| 359 | type ReplaceSupersOptionsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupersOptions# = ReplaceSupersOptionsBasescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupersOptionsBase# & |
| 360 | ( |
| 361 | | { objectRef?: undefined; getObjectRef: () => tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.Nodescip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Node# } |
| 362 | | { objectRef: tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.Nodescip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Node#; getObjectRef?: undefined } |
| 363 | ) & |
| 364 | ( |
| 365 | | { superRef?: undefined; getSuperRef: () => tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.Nodescip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Node# } |
| 366 | | { superRef: tscip-typescript npm @babel/types 7.20.7 src/`index.ts`/.Nodescip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Node#; getSuperRef?: undefined } |
| 367 | ); |
| 368 | |
| 369 | interface ReplaceStatescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceState# { |
| 370 | filescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceState#file.: Filescip-typescript npm @babel/core 7.20.12 src/transformation/file/`file.ts`/File#; |
| 371 | scopescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceState#scope.: Scopescip-typescript npm @babel/traverse 7.20.13 src/scope/`index.ts`/Scope#; |
| 372 | isDerivedConstructorscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceState#isDerivedConstructor.: boolean; |
| 373 | isStaticscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceState#isStatic.: boolean; |
| 374 | isPrivateMethodscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceState#isPrivateMethod.: boolean; |
| 375 | getObjectRefscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceState#getObjectRef.: ReplaceSupersscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#["getObjectRef"scip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#getObjectRef().]; |
| 376 | getSuperRefscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceState#getSuperRef.: ReplaceSupersscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#["getSuperRef"scip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#getSuperRef().]; |
| 377 | } |
| 378 | |
| 379 | export default class ReplaceSupersscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers# { |
| 380 | constructorscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#`<constructor>`().(optsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#`<constructor>`().(opts): ReplaceSupersOptionsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupersOptions#) { |
| 381 | const path = optsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#`<constructor>`().(opts).methodPathscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupersOptionsBase#typeLiteral215:methodPath.; |
| 382 | |
| 383 | this.methodPathscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#methodPath. = path; |
| 384 | this.isDerivedConstructorscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#isDerivedConstructor. = |
| 385 | path.isClassMethodscip-typescript npm @babel/traverse 7.20.13 src/path/generated/`validators.d.ts`/BaseNodePathValidators#isClassMethod().({ kindscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/kind0:: "constructor" }) && !!optsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#`<constructor>`().(opts).superRef; |
| 386 | this.isStaticscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#isStatic. = |
| 387 | path.isObjectMethodscip-typescript npm @babel/traverse 7.20.13 src/path/generated/`validators.d.ts`/BaseNodePathValidators#isObjectMethod().() || |
| 388 | // @ts-expect-error static is not in ClassPrivateMethod |
| 389 | path.nodescip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath#node..static || |
| 390 | path.isStaticBlockscip-typescript npm @babel/traverse 7.20.13 src/path/generated/`validators.d.ts`/BaseNodePathValidators#isStaticBlock().?.(); |
| 391 | this.isPrivateMethodscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#isPrivateMethod. = path.isPrivatescip-typescript npm @babel/traverse 7.20.13 src/path/generated/`validators.d.ts`/BaseNodePathValidators#isPrivate().() && path.isMethodscip-typescript npm @babel/traverse 7.20.13 src/path/generated/`validators.d.ts`/BaseNodePathValidators#isMethod().(); |
| 392 | |
| 393 | this.filescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#file. = optsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#`<constructor>`().(opts).filescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupersOptionsBase#typeLiteral215:file.; |
| 394 | this.constantSuperscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#constantSuper. = process.env.BABEL_8_BREAKING |
| 395 | ? optsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#`<constructor>`().(opts).constantSuperscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupersOptionsBase#typeLiteral215:constantSuper. |
| 396 | : // Fallback to isLoose for backward compatibility |
| 397 | optsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#`<constructor>`().(opts).constantSuperscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupersOptionsBase#typeLiteral215:constantSuper. ?? (optsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#`<constructor>`().(opts) as any).isLoose; |
| 398 | this.optsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#opts. = optsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#`<constructor>`().(opts); |
| 399 | } |
| 400 | |
| 401 | declare filescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#file.: Filescip-typescript npm @babel/core 7.20.12 src/transformation/file/`file.ts`/File#; |
| 402 | declare isDerivedConstructorscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#isDerivedConstructor.: boolean; |
| 403 | declare constantSuperscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#constantSuper.: boolean; |
| 404 | declare isPrivateMethodscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#isPrivateMethod.: boolean; |
| 405 | declare isStaticscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#isStatic.: boolean; |
| 406 | declare methodPathscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#methodPath.: NodePathscip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath#; |
| 407 | declare optsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#opts.: ReplaceSupersOptionsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupersOptions#; |
| 408 | |
| 409 | getObjectRefscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#getObjectRef().() { |
| 410 | return cloneNodescip-typescript npm @babel/types 7.20.7 src/clone/`cloneNode.ts`/cloneNode().(this.optsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#opts..objectRef || this.optsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#opts..getObjectRef()); |
| 411 | } |
| 412 | |
| 413 | getSuperRefscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#getSuperRef().() { |
| 414 | if (this.optsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#opts..superRef) return cloneNodescip-typescript npm @babel/types 7.20.7 src/clone/`cloneNode.ts`/cloneNode().(this.optsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#opts..superRef); |
| 415 | if (this.optsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#opts..getSuperRef) { |
| 416 | return cloneNodescip-typescript npm @babel/types 7.20.7 src/clone/`cloneNode.ts`/cloneNode().(this.optsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#opts..getSuperRef()); |
| 417 | } |
| 418 | } |
| 419 | |
| 420 | replacescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#replace().() { |
| 421 | // https://github.com/babel/babel/issues/11994 |
| 422 | if (this.optsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#opts..refToPreservescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupersOptionsBase#typeLiteral215:refToPreserve.) { |
| 423 | this.methodPathscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#methodPath..traversescip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath#traverse().(unshadowSuperBindingVisitorscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/unshadowSuperBindingVisitor., { |
| 424 | refNamescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/refName0:: this.optsscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#opts..refToPreservescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupersOptionsBase#typeLiteral215:refToPreserve..namescip-typescript npm @babel/types 7.20.7 src/ast-types/generated/`index.ts`/Identifier#name., |
| 425 | }); |
| 426 | } |
| 427 | |
| 428 | const handler = this.constantSuperscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#constantSuper. ? looseHandlersscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/looseHandlers. : specHandlersscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/specHandlers.; |
| 429 | |
| 430 | memberExpressionToFunctionsscip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/memberExpressionToFunctions().<ReplaceStatescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceState#>(this.methodPathscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#methodPath., visitorscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/visitor., { |
| 431 | filescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceState#file.: this.filescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#file., |
| 432 | scopescip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceState#scope.: this.methodPathscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#methodPath..scopescip-typescript npm @babel/traverse 7.20.13 src/path/`index.ts`/NodePath#scope., |
| 433 | isDerivedConstructorscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceState#isDerivedConstructor.: this.isDerivedConstructorscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#isDerivedConstructor., |
| 434 | isStaticscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceState#isStatic.: this.isStaticscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#isStatic., |
| 435 | isPrivateMethodscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceState#isPrivateMethod.: this.isPrivateMethodscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#isPrivateMethod., |
| 436 | getObjectRefscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceState#getObjectRef.: this.getObjectRefscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#getObjectRef()..bindscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/CallableFunction#bind().(this), |
| 437 | getSuperRefscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceState#getSuperRef.: this.getSuperRefscip-typescript npm @babel/helper-replace-supers 7.20.7 src/`index.ts`/ReplaceSupers#getSuperRef()..bindscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/CallableFunction#bind().(this), |
| 438 | // we dont need boundGet here, but memberExpressionToFunctions handler needs it. |
| 439 | boundGetscip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/Handler#boundGet().: handler.getscip-typescript npm @babel/helper-member-expression-to-functions 7.20.7 src/`index.ts`/Handler#get()., |
| 440 | ...handler, |
| 441 | }); |
| 442 | } |
| 443 | } |