docs: function skipTrivia(text, pos, stopAfterLineBreak, stopAtComments) {
          if (stopAtComments === void 0) { stopAtComments = false; }
          // Using ! with a greater than test is a fast way of testing the following conditions:
          //  pos === undefined || pos === null || isNaN(pos) || pos < 0;
          if (!(pos >= 0)) {
              return pos;
          }
          // Keep in sync with couldStartTrivia
          while (true) {
              var ch = text.charCodeAt(pos);
              switch (ch) {
                  case 13 /* carriageReturn */:
                      if (text.charCodeAt(pos + 1) === 10 /* lineFeed */) {
                          pos++;
                      }
                  case 10 /* lineFeed */:
                      pos++;
                      if (stopAfterLineBreak) {
                          return pos;
                      }
                      continue;
                  case 9 /* tab */:
                  case 11 /* verticalTab */:
                  case 12 /* formFeed */:
                  case 32 /* space */:
                      pos++;
                      continue;
                  case 47 /* slash */:
                      if (stopAtComments) {
                          break;
                      }
                      if (text.charCodeAt(pos + 1) === 47 /* slash */) {
                          pos += 2;
                          while (pos < text.length) {
                              if (isLineBreak(text.charCodeAt(pos))) {
                                  break;
                              }
                              pos++;
                          }
                          continue;
                      }
                      if (text.charCodeAt(pos + 1) === 42 /* asterisk */) {
                          pos += 2;
                          while (pos < text.length) {
                              if (text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) {
                                  pos += 2;
                                  break;
                              }
                              pos++;
                          }
                          continue;
                      }
                      break;
                  case 60 /* lessThan */:
                  case 61 /* equals */:
                  case 62 /* greaterThan */:
                      if (isConflictMarkerTrivia(text, pos)) {
                          pos = scanConflictMarkerTrivia(text, pos);
                          continue;
                      }
                      break;
                  case 35 /* hash */:
                      if (pos === 0 && isShebangTrivia(text, pos)) {
                          pos = scanShebangTrivia(text, pos);
                          continue;
                      }
                      break;
                  default:
                      if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpace(ch))) {
                          pos++;
                          continue;
                      }
                      break;
              }
              return pos;
          }
      }