(id: string | null)
| 153 | // loader's `validate` in another package. The patterns below stay for the |
| 154 | // file's own declarations. |
| 155 | const sameFile = (id: string | null): string | null => |
| 156 | id !== null && context.getNodeById?.(id)?.filePath === ref.filePath ? id : null; |
| 157 | // Pattern 1: Middleware references |
| 158 | if (isMiddlewareName(ref.referenceName)) { |
| 159 | const result = sameFile(resolveMiddleware(ref.referenceName, context, ref.filePath)); |