MCPcopy
hub / github.com/vercel/next.js / _get

Function _get

packages/next/src/compiled/babel-packages/packages-bundle.js:193–193  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

191 `])}else{return n.template.expression.ast`
192 function () { throw new ReferenceError("'delete super.prop' is invalid"); }()
193 `}}};const x={memoise(e,r){const{scope:t,node:s}=e;const{computed:a,property:n}=s;if(!a){return}const o=t.maybeGenerateMemoised(n);if(!o){return}this.memoiser.set(n,o,r)},prop(e){const{computed:r,property:t}=e.node;if(this.memoiser.has(t)){return c(this.memoiser.get(t))}if(r){return c(t)}return f(t.name)},_getPrototypeOfExpression(){const e=c(this.getObjectRef());const r=this.isStatic||this.isPrivateMethod?e:u(e,d("prototype"));return l(this.file.addHelper("getPrototypeOf"),[r])},get(e){return this._get(e)},_get(e){const r=this._getPrototypeOfExpression();return l(this.file.addHelper("get"),[this.isDerivedConstructor?p([y(),r]):r,this.prop(e),y()])},set(e,r){const t=this._getPrototypeOfExpression();return l(this.file.addHelper("set"),[this.isDerivedConstructor?p([y(),t]):t,this.prop(e),r,y(),n.types.booleanLiteral(e.isInStrictMode())])},destructureSet(e){throw e.buildCodeFrameError(`Destructuring to a super field is not supported yet.`)},call(e,r){return(0,a.default)(this._get(e),y(),r,false)},optionalCall(e,r){return(0,a.default)(this._get(e),c(y()),r,true)},delete(e){if(e.node.computed){return p([l(this.file.addHelper("toPropertyKey"),[c(e.node.property)]),n.template.expression.ast`
194 function () { throw new ReferenceError("'delete super[expr]' is invalid"); }()
195 `])}else{return n.template.expression.ast`
196 function () { throw new ReferenceError("'delete super.prop' is invalid"); }()

Callers

nothing calls this directly

Calls 5

pFunction · 0.70
yFunction · 0.70
lFunction · 0.50
addHelperMethod · 0.45
propMethod · 0.45

Tested by

no test coverage detected