Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jan 19, 2024
1 parent 3f34919 commit 4fedec1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
html, body { margin: 0; }
.shiki { padding: 2em; }
</style>
<pre class="shiki vitesse-light twoslash lsp" style="background-color:#ffffff;color:#393a34" tabindex="0"><code><span class="line"><span style="color:#AB5959">const</span><span> </span><span style="color:#B07D48"><data-lsp lsp="const a: boolean">a</data-lsp></span><span style="color:#AB5959"> </span><span style="color:#999999">=</span><span style="color:#AB5959"> </span><span style="color:#B07D48"><data-lsp lsp="var Number: NumberConstructor">Number</data-lsp></span><span style="color:#999999">.</span><span style="color:#59873A"><data-lsp lsp="(method) NumberConstructor.isNaN(number: unknown): boolean">isNaN</data-lsp></span><span style="color:#999999">(</span><span style="color:#2F798A">123</span><span style="color:#999999">)</span></span><div class="meta-line"> <span class="inline-completions"><ul class="dropdown"><li><span><span class="result-found">i</span>sFinite</span></li><li><span><span class="result-found">i</span>sInteger</span></li><li><span><span class="result-found">i</span>sNaN</span></li><li><span><span class="result-found">i</span>sSafeInteger</span></li></ul></span></div><span class="line"></span></code></pre>
<pre class="shiki vitesse-light twoslash lsp" style="background-color:#ffffff;color:#393a34" tabindex="0"><code><span class="line"><span style="color:#AB5959">const</span><span> </span><span style="color:#B07D48"><data-lsp lsp="const a: boolean">a</data-lsp></span><span style="color:#AB5959"> </span><span style="color:#999999">=</span><span style="color:#AB5959"> </span><span style="color:#B07D48"><data-lsp lsp="var Number: NumberConstructor">Number</data-lsp></span><span style="color:#999999">.</span><span style="color:#59873A"><data-lsp lsp="(method) NumberConstructor.isNaN(number: unknown): boolean">i</data-lsp></span><span style="color:#59873A"><data-lsp lsp="(method) NumberConstructor.isNaN(number: unknown): boolean">sNaN</data-lsp></span><span style="color:#999999">(</span><span style="color:#2F798A">123</span><span style="color:#999999">)</span></span><div class="meta-line"> <span class="inline-completions"><ul class="dropdown"><li><span><span class="result-found">i</span>sFinite</span></li><li><span><span class="result-found">i</span>sInteger</span></li><li><span><span class="result-found">i</span>sNaN</span></li><li><span><span class="result-found">i</span>sSafeInteger</span></li></ul></span></div><span class="line"></span></code></pre>
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
<span class="line"></span>
<span class="line"><span style="color:#CB7676">let</span><span> </span><span style="color:#BD976A"><data-lsp lsp="let a: NameLabel">a</data-lsp></span><span style="color:#CB7676"> </span><span style="color:#666666">=</span><span style="color:#CB7676"> </span><span style="color:#80A665"><data-lsp lsp="function createLabel<&#x22;typescript&#x22;>(idOrName: &#x22;typescript&#x22;): NameLabel">createLabel</data-lsp></span><span style="color:#666666">(</span><span style="color:#C98A7D99">"</span><span style="color:#C98A7D">typescript</span><span style="color:#C98A7D99">"</span><span style="color:#666666">)</span></span><div class="meta-line"> <span class="popover"><div class="arrow"></div>let a: NameLabel</span></div><span class="line"></span>
<span class="line"><span style="color:#CB7676">let</span><span> </span><span style="color:#BD976A"><data-lsp lsp="let b: IdLabel">b</data-lsp></span><span style="color:#CB7676"> </span><span style="color:#666666">=</span><span style="color:#CB7676"> </span><span style="color:#80A665"><data-lsp lsp="function createLabel<2.8>(idOrName: 2.8): IdLabel">createLabel</data-lsp></span><span style="color:#666666">(</span><span style="color:#4C9A91">2.8</span><span style="color:#666666">)</span></span><div class="meta-line"> <span class="popover"><div class="arrow"></div>function createLabel&#x3C;2.8>(idOrName: 2.8): IdLabel</span></div><span class="line"></span>
<span class="line"><span style="color:#CB7676">let</span><span> </span><span style="color:#BD976A"><data-lsp lsp="let c: IdLabel | NameLabel">c</data-lsp></span><span style="color:#CB7676"> </span><span style="color:#666666">=</span><span style="color:#CB7676"> </span><span style="color:#80A665"><data-lsp lsp="function createLabel<&#x22;hello&#x22; | 42>(idOrName: &#x22;hello&#x22; | 42): IdLabel | NameLabel">createLabel</data-lsp></span><span style="color:#666666">(</span><span style="color:#BD976A"><data-lsp lsp="var Math: Math">Math</data-lsp></span><span style="color:#666666">.</span><span style="color:#80A665"><data-lsp lsp="(method) Math.random(): number">random</data-lsp></span><span style="color:#666666">()</span><span> </span><span style="color:#CB7676">?</span><span> </span><span style="color:#C98A7D99">"</span><span style="color:#C98A7D">hello</span><span style="color:#C98A7D99">"</span><span> </span><span style="color:#CB7676">:</span><span> </span><span style="color:#4C9A91">42</span><span style="color:#666666">)</span></span><div class="meta-line"> <span class="inline-completions"><ul class="dropdown"><li><span><span class="result-found">r</span>andom</span></li><li><span><span class="result-found">r</span>ound</span></li></ul></span></div><span class="line"></span></code></pre>
<span class="line"><span style="color:#CB7676">let</span><span> </span><span style="color:#BD976A"><data-lsp lsp="let c: IdLabel | NameLabel">c</data-lsp></span><span style="color:#CB7676"> </span><span style="color:#666666">=</span><span style="color:#CB7676"> </span><span style="color:#80A665"><data-lsp lsp="function createLabel<&#x22;hello&#x22; | 42>(idOrName: &#x22;hello&#x22; | 42): IdLabel | NameLabel">createLabel</data-lsp></span><span style="color:#666666">(</span><span style="color:#BD976A"><data-lsp lsp="var Math: Math">Math</data-lsp></span><span style="color:#666666">.</span><span style="color:#80A665"><data-lsp lsp="(method) Math.random(): number">r</data-lsp></span><span style="color:#80A665"><data-lsp lsp="(method) Math.random(): number">andom</data-lsp></span><span style="color:#666666">()</span><span> </span><span style="color:#CB7676">?</span><span> </span><span style="color:#C98A7D99">"</span><span style="color:#C98A7D">hello</span><span style="color:#C98A7D99">"</span><span> </span><span style="color:#CB7676">:</span><span> </span><span style="color:#4C9A91">42</span><span style="color:#666666">)</span></span><div class="meta-line"> <span class="inline-completions"><ul class="dropdown"><li><span><span class="result-found">r</span>andom</span></li><li><span><span class="result-found">r</span>ound</span></li></ul></span></div><span class="line"></span></code></pre>
2 changes: 1 addition & 1 deletion packages/shikiji-twoslash/test/out/rich/no-icons.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<span class="line"><span> </span><span style="color:#D8DEE9FF">boo</span><span style="color:#81A1C1">:</span><span style="color:#D8DEE9FF"> </span><span style="color:#8FBCBB">number</span><span style="color:#81A1C1">;</span></span>
<span class="line"><span style="color:#D8DEE9FF"> </span><span style="color:#88C0D0">bar</span><span style="color:#81A1C1">:</span><span style="color:#D8DEE9FF"> </span><span style="color:#ECEFF4">()</span><span style="color:#D8DEE9FF"> </span><span style="color:#81A1C1">=></span><span style="color:#D8DEE9FF"> </span><span style="color:#8FBCBB">number</span><span style="color:#81A1C1">;</span></span>
<span class="line"><span> </span><span style="color:#D8DEE9FF">baz</span><span style="color:#81A1C1">:</span><span style="color:#D8DEE9FF"> </span><span style="color:#8FBCBB">string</span><span style="color:#81A1C1">;</span></span>
<span class="line"><span style="color:#ECEFF4">}</span></span></code></span>obj</span></span><span style="color:#ECEFF4">.</span><span style="color:#D8DEE9"><span>b<span class="twoslash-completion-cursor"><ul class="twoslash-completion-list"><li><span><span class="twoslash-completions-matched">b</span><span class="twoslash-completions-unmatched">ar</span></span></li><li><span><span class="twoslash-completions-matched">b</span><span class="twoslash-completions-unmatched">az</span></span></li><li><span><span class="twoslash-completions-matched">b</span><span class="twoslash-completions-unmatched">oo</span></span></li></ul></span>oo</span></span></span>
<span class="line"><span style="color:#ECEFF4">}</span></span></code></span>obj</span></span><span style="color:#ECEFF4">.</span><span style="color:#D8DEE9"><span>b<span class="twoslash-completion-cursor"><ul class="twoslash-completion-list"><li><span><span class="twoslash-completions-matched">b</span><span class="twoslash-completions-unmatched">ar</span></span></li><li><span><span class="twoslash-completions-matched">b</span><span class="twoslash-completions-unmatched">az</span></span></li><li><span><span class="twoslash-completions-matched">b</span><span class="twoslash-completions-unmatched">oo</span></span></li></ul></span></span></span><span style="color:#D8DEE9"><span class="twoslash-hover"><span class="twoslash-popup-container"><code class="twoslash-popup-code"><span class="line"><span style="color:#D8DEE9FF">boo</span><span style="color:#ECEFF4">:</span><span style="color:#D8DEE9FF"> </span><span style="color:#D8DEE9">number</span></span></code></span>oo</span></span></span>
<span class="line"></span></code></pre><style>:root {--twoslash-popup-bg: #2e3440;}</style>
<script>
function toggleColor() {
Expand Down
Loading

0 comments on commit 4fedec1

Please sign in to comment.