function computeAccessType(name) {
    if (name.startsWith('_') || name.startsWith('$')) {
      // (at least) 2 prefixes
      if (name.startsWith('__') || name.startsWith('$$')) {
        return 'private';
      }
      return 'protected';
    }
    return 'public';
  }
Detects private/publicness based on underscores. Checks '$' as well
@param {string} name
@returns {'public'|'protected'|'private'}