docs: function isSourceFileLevelDeclarationInSystemJsModule(node, isExported) {
                  if (!node || !isCurrentFileSystemExternalModule()) {
                      return false;
                  }
                  var current = ts.getRootDeclaration(node).parent;
                  while (current) {
                      if (current.kind === 256 /* SourceFile */) {
                          return !isExported || ((ts.getCombinedNodeFlags(node) & 1 /* Export */) !== 0);
                      }
                      else if (ts.isDeclaration(current)) {
                          return false;
                      }
                      else {
                          current = current.parent;
                      }
                  }
              }