@spark-web/next-utils
Version:
--- title: Next.js Utils isExperimentalPackage: true ---
16 lines (15 loc) • 811 B
TypeScript
/// <reference types="react" />
/**
* Resolves internal links using the
* [Next.js Link component](https://nextjs.org/docs/api-reference/next/link), which
* expects "href" to begin with a slash e.g. `href="/page"`. Uses a traditional
* anchor element for everything else e.g. external, hash, tel, mailto.
*
* For compatibility with TS + Spark the "href" property may only accept a
* string, so URL Objects must be resolved ahead of time. We recommend the [url
* package](https://www.npmjs.com/package/url) for complex cases, though most of
* the time it's simple to do this manually.
*/
export declare const UniversalNextLink: {
readonly __forwardRef__: import("react").ForwardRefExoticComponent<import("@spark-web/link").LinkComponentProps & import("react").RefAttributes<HTMLAnchorElement>>;
};