-
-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(twoslash)!: move to
twoslash
package for better performance an…
…d composablity (#91)
- Loading branch information
Showing
26 changed files
with
200 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
--- | ||
outline: deep | ||
--- | ||
|
||
# shikiji-transformers | ||
|
||
<Badges name="shikiji-transformers" /> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import type { Element } from 'hast' | ||
import type { TwoSlashReturn } from '@typescript/twoslash' | ||
import type { NodeCompletion } from 'twoslash' | ||
import completionIcons from './icons-completions.json' | ||
import tagIcons from './icons-tags.json' | ||
|
||
export type CompletionItem = NonNullable<TwoSlashReturn['queries'][0]['completions']>[0] | ||
export type CompletionItem = NonNullable<NodeCompletion['completions']>[number] | ||
|
||
export const defaultCompletionIcons: Record<CompletionItem['kind'], Element | undefined> = completionIcons as any | ||
export const defaultCustomTagIcons: Record<string, Element | undefined> = tagIcons as any |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
import { twoslasher } from '@typescript/twoslash' | ||
import { createTransformerFactory } from './core' | ||
import { createTwoSlasher } from 'twoslash' | ||
import { createTransformerFactory, rendererClassic } from './core' | ||
|
||
export * from './core' | ||
|
||
/** | ||
* Factory function to create a Shikiji transformer for twoslash integrations. | ||
*/ | ||
export const transformerTwoSlash = createTransformerFactory(twoslasher) | ||
export const transformerTwoSlash = /* @__PURE__ */ createTransformerFactory( | ||
/* @__PURE__ */ createTwoSlasher(), | ||
/* @__PURE__ */ rendererClassic(), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.