remix/route-pattern/href · Type

View Source

CreateHrefErrorDetails

Summary

Structured details for a CreateHrefError.

Signature

type CreateHrefErrorDetails =
  | { pattern: RoutePattern; type: 'missing-hostname' }
  | {
      missingParams: string[]
      params: Record<string, unknown>
      pattern: RoutePattern
      type: 'missing-params'
    }
  | { pattern: RoutePattern; type: 'nameless-wildcard' }
  | { char: string; type: 'invalid-hostname-variable'; value: string }
  | { char: string; type: 'invalid-hostname-wildcard'; value: string }
  | { paramName: string; pattern: RoutePattern; type: 'invalid-pathname-variable'; value: string }