code: function getThrowStatementOwner(throwStatement) {
                      var child = throwStatement;
                      while (child.parent) {
                          var parent_22 = child.parent;
                          if (ts.isFunctionBlock(parent_22) || parent_22.kind === 256 /* SourceFile */) {
                              return parent_22;
                          }
                          // A throw-statement is only owned by a try-statement if the try-statement has
                          // a catch clause, and if the throw-statement occurs within the try block.
                          if (parent_22.kind === 216 /* TryStatement */) {
                              var tryStatement = parent_22;
                              if (tryStatement.tryBlock === child && tryStatement.catchClause) {
                                  return child;
                              }
                          }
                          child = parent_22;
                      }
                      return undefined;
                  }
docs: For lack of a better name, this function takes a throw statement and returns the
  nearest ancestor that is a try-block (whose try statement has a catch clause),
  function-block, or source file.