MCPcopy Create free account
hub / github.com/babel/babel / pushClassPrivateProperty

Function pushClassPrivateProperty

packages/babel-parser/src/parser/statement.ts:2039–2052  ·  view source on GitHub ↗
(
    this: Parser,
    classBody: Undone<N.ClassBody>,
    prop: Undone<N.ClassPrivateProperty>,
  )

Source from the content-addressed store, hash-verified

2037 }
2038
2039 pushClassPrivateProperty(
2040 this: Parser,
2041 classBody: Undone<N.ClassBody>,
2042 prop: Undone<N.ClassPrivateProperty>,
2043 ) {
2044 const node = this.parseClassPrivateProperty(prop);
2045 classBody.body.push(node);
2046
2047 this.classScope.declarePrivateName(
2048 this.getPrivateNameSV(node.key),
2049 ClassElementType.OTHER,
2050 node.key.start!,
2051 );
2052 }
2053
2054 pushClassAccessorProperty(
2055 this: Parser,

Callers

nothing calls this directly

Calls 4

declarePrivateNameMethod · 0.80
getPrivateNameSVMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected