import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
export var setNodeSelection = function setNodeSelection(view, pos) {
  var state = view.state,
    dispatch = view.dispatch;
  if (!isFinite(pos)) {
    return;
  }
  var tr = state.tr.setSelection(NodeSelection.create(state.doc, pos));
  dispatch(tr);
};