Skip to content

Commit

Permalink
Paraglide: Fix typing for newLanguage in demo code (#337)
Browse files Browse the repository at this point in the history
Co-authored-by: CokaKoala <31664583+AdrianGonz97@users.noreply.github.com>
  • Loading branch information
msgeissler and AdrianGonz97 authored Dec 3, 2024
1 parent acad4af commit 9563557
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/healthy-boxes-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"sv": patch
---

fix: updated jsdoc type for `paraglide` demo
2 changes: 1 addition & 1 deletion packages/addons/paraglide/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ export default defineAddon({
scriptCode.append('\n\n');
scriptCode.append(dedent`
${ts('', '/**')}
${ts('', '* @param import("$lib/paraglide/runtime").AvailableLanguageTag newLanguage')}
${ts('', '* @param {import("$lib/paraglide/runtime").AvailableLanguageTag} newLanguage')}
${ts('', '*/')}
function switchToLanguage(newLanguage${ts(': AvailableLanguageTag')}) {
const canonicalPath = i18n.route($page.url.pathname);
Expand Down

0 comments on commit 9563557

Please sign in to comment.