(id: string | null)
| 143 | // loader's `validate` in another package. The patterns below stay for the |
| 144 | // file's own declarations. |
| 145 | const sameFile = (id: string | null): string | null => |
| 146 | id !== null && context.getNodeById?.(id)?.filePath === ref.filePath ? id : null; |
| 147 | // Pattern 1: Middleware references |
| 148 | if (isMiddlewareName(ref.referenceName)) { |
| 149 | const result = sameFile(resolveMiddleware(ref.referenceName, context, ref.filePath)); |