Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

docs: Addtwoslash-svelte#955

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Hugos68 wants to merge5 commits intosveltejs:main
base:main
Choose a base branch
Loading
fromHugos68:feat/twoslash-svelte

Conversation

Hugos68
Copy link

@Hugos68Hugos68 commentedDec 7, 2024
edited
Loading

A note on documentation PRs

Closes#649

This PR replaced thetwoslash withtwoslash-svelte package to allow type hints to be available onsvelte codeblocks.

Note:
Currently this PR installs the@hugokorte/twoslash-svelte PR, this is because the original/officialtwoslash-svelte package won't be published untilThis PR is merged. The code is simply a copy and published seperately.

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR references an issue where it is discussed ahead of time.
  • Prefix your PR title withfeat:,fix:,chore:, ordocs:.
  • This message body should clearly illustrate what problems it solves.

@vercelVercel
Copy link

vercelbot commentedDec 7, 2024
edited
Loading

The latest updates on your projects. Learn more aboutVercel for Git ↗︎

NameStatusPreviewCommentsUpdated (UTC)
svelte-dev❌ Failed (Inspect)Jan 13, 2025 8:23am

@vercelVercel
Copy link

vercelbot commentedDec 7, 2024

@Hugos68 is attempting to deploy a commit to theSvelte Team onVercel.

A member of the Team first needs toauthorize it.

@Rich-Harris
Copy link
Member

Thank you! It looks like line 689 needs updating...

-} else if (language === 'js' || language === 'ts') {+} else if (language === 'js' || language === 'ts' || language === 'svelte') {

...along with line 700:

-lang: 'ts',+lang: language === 'svelte' ? language : 'ts',

Though when I make those changes locally, I start seeing errors like this which I I don't really understand 😆 maybe@dummdidumm can make sense of them:

index.tsx
[2304] 128 - Cannot find name 'svelteHTML'.
[2304] 323 - Cannot find name '__sveltets_2_isomorphic_component'.
[2304] 357 - Cannot find name '__sveltets_2_partial'.
[2304] 378 - Cannot find name '__sveltets_2_with_any_event'.

@Hugos68
Copy link
Author

Hugos68 commentedDec 13, 2024
edited
Loading

Though when I make those changes locally, I start seeing errors like this

Ahh, these are expected! That meanssomething is working, thanks for checking it out, I'll make your changes and continue working on it. I do have to see the Svelte docs rendered is quite the module. Lots of stuff going on.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@dummdidummdummdidummAwaiting requested review from dummdidumm

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Use shiki-twoslash for .svelte code blocks
2 participants
@Hugos68@Rich-Harris

[8]ページ先頭

©2009-2025 Movatter.jp