各 route 生成器的默认规则与判断过程
策略的具体实现如下。
ts
function route(target: string, id?: string) {
return { id: id ?? `to-${target}`, targetNodeId: target };
}