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

Function pushClassPrivateProperty

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

declarePrivateNameMethod · 0.80
getPrivateNameSVMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected