code: function getSuperContainer(node, stopOnFunctions) {
          while (true) {
              node = node.parent;
              if (!node) {
                  return node;
              }
              switch (node.kind) {
                  case 140 /* ComputedPropertyName */:
                      node = node.parent;
                      break;
                  case 220 /* FunctionDeclaration */:
                  case 179 /* FunctionExpression */:
                  case 180 /* ArrowFunction */:
                      if (!stopOnFunctions) {
                          continue;
                      }
                  case 145 /* PropertyDeclaration */:
                  case 144 /* PropertySignature */:
                  case 147 /* MethodDeclaration */:
                  case 146 /* MethodSignature */:
                  case 148 /* Constructor */:
                  case 149 /* GetAccessor */:
                  case 150 /* SetAccessor */:
                      return node;
                  case 143 /* Decorator */:
                      // Decorators are always applied outside of the body of a class or method.
                      if (node.parent.kind === 142 /* Parameter */ && isClassElement(node.parent.parent)) {
                          // If the decorator's parent is a Parameter, we resolve the this container from
                          // the grandparent class declaration.
                          node = node.parent.parent;
                      }
                      else if (isClassElement(node.parent)) {
                          // If the decorator's parent is a class element, we resolve the 'this' container
                          // from the parent class declaration.
                          node = node.parent;
                      }
                      break;
              }
          }
      }
docs: Given an super call\property node returns a closest node where either
  - super call\property is legal in the node and not legal in the parent node the node.
  i.e. super call is legal in constructor but not legal in the class body.
  - node is arrow function (so caller might need to call getSuperContainer in case it needs to climb higher)
  - super call\property is definitely illegal in the node (but might be legal in some subnode)
  i.e. super property access is illegal in function declaration but can be legal in the statement list