From 73b4e329b3d84bec66b5c4a95aa3f513cadd8e5d Mon Sep 17 00:00:00 2001 From: iksflow Date: Fri, 19 May 2023 13:52:36 +0900 Subject: [PATCH] typo: Router.d.ts Upate -> Update --- Router.d.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Router.d.ts b/Router.d.ts index 1c78760..686d5e3 100644 --- a/Router.d.ts +++ b/Router.d.ts @@ -116,9 +116,11 @@ export type LinkActionOpts = { } /** Type for the update function of the link action */ -export type LinkActionUpateFunc = ((opts?: LinkActionOpts) => void) | +export type LinkActionUpdateFunc = ((opts?: LinkActionOpts) => void) | ((hrefVar?: string) => void) +/** Type for backwards-compatible (typo: Upate) */ +export type LinkActionUpateFunc = LinkActionUpdateFunc /** * Svelte Action that enables a link element (``) to use our history management. * @@ -132,8 +134,8 @@ export type LinkActionUpateFunc = ((opts?: LinkActionOpts) => void) | * @param opts - Dictionary with options for the link * @param hrefVar - A string to use in place of the link's href attribute. Using this allows for updating link's targets reactively. This is a shorthand for opts.href */ -export function link(node: HTMLElement, opts?: LinkActionOpts): {update: LinkActionUpateFunc} -export function link(node: HTMLElement, hrefVar?: string): {update: LinkActionUpateFunc} +export function link(node: HTMLElement, opts?: LinkActionOpts): {update: LinkActionUpdateFunc} +export function link(node: HTMLElement, hrefVar?: string): {update: LinkActionUpdateFunc} /** Full location from the hash: page and querystring */ interface Location {