import{_ as o}from"./chunks/PageInfo.vue_vue_type_script_setup_true_lang.250b3e56.js";import{_ as a,o as n,c as t,H as r,k as s,a as l}from"./chunks/framework.b7580407.js";import"./chunks/commonjsHelpers.725317a4.js";const T=JSON.parse('{"title":"@types","description":"Using external libraries with Twoslash code examples.","frontmatter":{"description":"Using external libraries with Twoslash code examples.","title":"@types"},"headers":[],"relativePath":"application/vitepress-plugin-shiki-twoslash/api/types.md","filePath":"application/vitepress-plugin-shiki-twoslash/api/types.md","lastUpdated":1710267506000}'),c={name:"application/vitepress-plugin-shiki-twoslash/api/types.md"},i=s("h1",{id:"types",tabindex:"-1"},[l("@types "),s("a",{class:"header-anchor",href:"#types","aria-label":'Permalink to "@types"'},"​")],-1),p=s("p",null,"For most examples, you probably need to import external libraries into your code examples.",-1),y=s("p",null,[l("Twoslash works by faking a virtual file system over your existing file system. This means any "),s("code",null,"@types"),l(" or libraries with TypeScript definitions should work out of the box with no config.")],-1),d=s("h2",{id:"local-sources",tabindex:"-1"},[l("Local Sources "),s("a",{class:"header-anchor",href:"#local-sources","aria-label":'Permalink to "Local Sources"'},"​")],-1),u=s("p",null,"Simply import locally installed libraries and Twoslash can pick up types:",-1),f=s("div",{class:"vp-code-group vp-adaptive-theme"},[s("div",{class:"tabs"},[s("input",{type:"radio",name:"group-JyWV4",id:"tab-yvJGqnI",checked:"checked"}),s("label",{for:"tab-yvJGqnI"},"output"),s("input",{type:"radio",name:"group-JyWV4",id:"tab-D9xT5wx"}),s("label",{for:"tab-D9xT5wx"},"markdown")]),s("div",{class:"blocks"},[s("div",{class:"language-ts vp-adaptive-theme active line-numbers-mode"},[s("button",{title:"Copy Code",class:"copy"}),s("span",{class:"lang"},"ts"),s("pre",{class:"shiki github-dark-dimmed twoslash lsp",style:{"background-color":"#22272e",color:"#adbac7"}},[s("div",{class:"language-id"},"ts"),s("div",{class:"code-container"},[s("code",null,[s("div",{class:"line"},[s("span",{style:{color:"#F47067"}},"import"),s("span",{style:{color:"#ADBAC7"}},[l(" { "),s("data-lsp",{lsp:`(alias) function defineConfig(config: UserConfig<DefaultTheme.Config>): UserConfig<DefaultTheme.Config>
import defineConfig`},"defineConfig"),l(" } ")]),s("span",{style:{color:"#F47067"}},"from"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#96D0FF"}},"'vitepress'")]),s("div",{class:"line"},[s("span",{style:{color:"#F47067"}},"const"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#6CB6FF"}},[s("data-lsp",{lsp:"const config: UserConfig<DefaultTheme.Config>",style:{"border-bottom":"solid 2px lightgrey"}},"config")]),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F47067"}},"="),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#DCBDFB"}},[s("data-lsp",{lsp:`(alias) defineConfig(config: UserConfig<DefaultTheme.Config>): UserConfig<DefaultTheme.Config>
import defineConfig`},"defineConfig")]),s("span",{style:{color:"#ADBAC7"}},"({})")]),s("div",{class:"meta-line"},[s("span",{class:"popover-prefix"},"        "),s("span",{class:"popover"},[s("div",{class:"arrow"}),l("const config: UserConfig<DefaultTheme.Config>")])]),s("div",{class:"line"},[s("span",{style:{color:"#F47067"}},"export"),s("span",{style:{color:"#F69D50"}}," "),s("span",{style:{color:"#F47067"}},"default"),s("span",{style:{color:"#F69D50"}}," "),s("span",{style:{color:"#ADBAC7"}},[s("data-lsp",{lsp:"const config: UserConfig<DefaultTheme.Config>"},"config")])])])])]),s("pre",{class:"shiki github-light twoslash lsp",style:{"background-color":"#fff",color:"#24292e"}},[s("div",{class:"language-id"},"ts"),s("div",{class:"code-container"},[s("code",null,[s("div",{class:"line"},[s("span",{style:{color:"#D73A49"}},"import"),s("span",{style:{color:"#24292E"}},[l(" { "),s("data-lsp",{lsp:`(alias) function defineConfig(config: UserConfig<DefaultTheme.Config>): UserConfig<DefaultTheme.Config>
import defineConfig`},"defineConfig"),l(" } ")]),s("span",{style:{color:"#D73A49"}},"from"),s("span",{style:{color:"#24292E"}}," "),s("span",{style:{color:"#032F62"}},"'vitepress'")]),s("div",{class:"line"},[s("span",{style:{color:"#D73A49"}},"const"),s("span",{style:{color:"#24292E"}}," "),s("span",{style:{color:"#005CC5"}},[s("data-lsp",{lsp:"const config: UserConfig<DefaultTheme.Config>",style:{"border-bottom":"solid 2px lightgrey"}},"config")]),s("span",{style:{color:"#24292E"}}," "),s("span",{style:{color:"#D73A49"}},"="),s("span",{style:{color:"#24292E"}}," "),s("span",{style:{color:"#6F42C1"}},[s("data-lsp",{lsp:`(alias) defineConfig(config: UserConfig<DefaultTheme.Config>): UserConfig<DefaultTheme.Config>
import defineConfig`},"defineConfig")]),s("span",{style:{color:"#24292E"}},"({})")]),s("div",{class:"meta-line"},[s("span",{class:"popover-prefix"},"        "),s("span",{class:"popover"},[s("div",{class:"arrow"}),l("const config: UserConfig<DefaultTheme.Config>")])]),s("div",{class:"line"},[s("span",{style:{color:"#D73A49"}},"export"),s("span",{style:{color:"#24292E"}}," "),s("span",{style:{color:"#D73A49"}},"default"),s("span",{style:{color:"#24292E"}},[l(),s("data-lsp",{lsp:"const config: UserConfig<DefaultTheme.Config>"},"config")])])])])]),s("div",{class:"line-numbers-wrapper","aria-hidden":"true"},[s("span",{class:"line-number"},"1"),s("br")])]),s("div",{class:"language-md vp-adaptive-theme line-numbers-mode"},[s("button",{title:"Copy Code",class:"copy"}),s("span",{class:"lang"},"md"),s("pre",{class:"shiki github-dark-dimmed vp-code-dark"},[s("code",null,[s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"```ts twoslash")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#F47067"}},"import"),s("span",{style:{color:"#ADBAC7"}}," { defineConfig } "),s("span",{style:{color:"#F47067"}},"from"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#96D0FF"}},"'vitepress'")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#F47067"}},"const"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#6CB6FF"}},"config"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F47067"}},"="),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#DCBDFB"}},"defineConfig"),s("span",{style:{color:"#ADBAC7"}},"({})")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#768390"}},"//    ^?")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#F47067"}},"export"),s("span",{style:{color:"#F69D50"}}," "),s("span",{style:{color:"#F47067"}},"default"),s("span",{style:{color:"#F69D50"}}," "),s("span",{style:{color:"#ADBAC7"}},"config")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"```")])])]),s("pre",{class:"shiki github-light vp-code-light"},[s("code",null,[s("span",{class:"line"},[s("span",{style:{color:"#24292E"}},"```ts twoslash")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#D73A49"}},"import"),s("span",{style:{color:"#24292E"}}," { defineConfig } "),s("span",{style:{color:"#D73A49"}},"from"),s("span",{style:{color:"#24292E"}}," "),s("span",{style:{color:"#032F62"}},"'vitepress'")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#D73A49"}},"const"),s("span",{style:{color:"#24292E"}}," "),s("span",{style:{color:"#005CC5"}},"config"),s("span",{style:{color:"#24292E"}}," "),s("span",{style:{color:"#D73A49"}},"="),s("span",{style:{color:"#24292E"}}," "),s("span",{style:{color:"#6F42C1"}},"defineConfig"),s("span",{style:{color:"#24292E"}},"({})")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#6A737D"}},"//    ^?")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#D73A49"}},"export"),s("span",{style:{color:"#24292E"}}," "),s("span",{style:{color:"#D73A49"}},"default"),s("span",{style:{color:"#24292E"}}," config")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#24292E"}},"```")])])]),s("div",{class:"line-numbers-wrapper","aria-hidden":"true"},[s("span",{class:"line-number"},"1"),s("br"),s("span",{class:"line-number"},"2"),s("br"),s("span",{class:"line-number"},"3"),s("br"),s("span",{class:"line-number"},"4"),s("br"),s("span",{class:"line-number"},"5"),s("br"),s("span",{class:"line-number"},"6"),s("br")])])])],-1),m=s("h2",{id:"globals",tabindex:"-1"},[l("Globals "),s("a",{class:"header-anchor",href:"#globals","aria-label":'Permalink to "Globals"'},"​")],-1),g=s("p",null,[l("Setting up globals is a little bit more complex, but not drastically. You need to use the "),s("a",{href:"https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html#-reference-types-",target:"_blank",rel:"noreferrer"},"triple slash reference"),l(" which adds a particular library to the global scope.")],-1),h=s("p",null,"For example, setting up Node imports and globals etc.",-1),b=s("div",{class:"vp-code-group vp-adaptive-theme"},[s("div",{class:"tabs"},[s("input",{type:"radio",name:"group-JjGjc",id:"tab-OCexKA9",checked:"checked"}),s("label",{for:"tab-OCexKA9"},"output"),s("input",{type:"radio",name:"group-JjGjc",id:"tab-lx2y2Um"}),s("label",{for:"tab-lx2y2Um"},"markdown")]),s("div",{class:"blocks"},[s("div",{class:"language-ts vp-adaptive-theme active line-numbers-mode"},[s("button",{title:"Copy Code",class:"copy"}),s("span",{class:"lang"},"ts"),s("pre",{class:"shiki github-dark-dimmed twoslash lsp",style:{"background-color":"#22272e",color:"#adbac7"}},[s("div",{class:"language-id"},"ts"),s("div",{class:"code-container"},[s("code",null,[s("div",{class:"line"},[s("span",{style:{color:"#F47067"}},"import"),s("span",{style:{color:"#ADBAC7"}},[l(" { "),s("data-lsp",{lsp:`(alias) function writeFileSync(file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): void
import writeFileSync`},"writeFileSync"),l(" } ")]),s("span",{style:{color:"#F47067"}},"from"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#96D0FF"}},"'fs'")]),s("div",{class:"line"},[s("span",{style:{color:"#DCBDFB"}},[s("data-lsp",{lsp:`(alias) writeFileSync(file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions | undefined): void
import writeFileSync`},"writeFileSync")]),s("span",{style:{color:"#ADBAC7"}},"("),s("span",{style:{color:"#96D0FF"}},"'myfile.txt'"),s("span",{style:{color:"#ADBAC7"}},", "),s("span",{style:{color:"#96D0FF"}},"'// TODO'"),s("span",{style:{color:"#ADBAC7"}},")")])])])]),s("pre",{class:"shiki github-light twoslash lsp",style:{"background-color":"#fff",color:"#24292e"}},[s("div",{class:"language-id"},"ts"),s("div",{class:"code-container"},[s("code",null,[s("div",{class:"line"},[s("span",{style:{color:"#D73A49"}},"import"),s("span",{style:{color:"#24292E"}},[l(" { "),s("data-lsp",{lsp:`(alias) function writeFileSync(file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): void
import writeFileSync`},"writeFileSync"),l(" } ")]),s("span",{style:{color:"#D73A49"}},"from"),s("span",{style:{color:"#24292E"}}," "),s("span",{style:{color:"#032F62"}},"'fs'")]),s("div",{class:"line"},[s("span",{style:{color:"#6F42C1"}},[s("data-lsp",{lsp:`(alias) writeFileSync(file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions | undefined): void
import writeFileSync`},"writeFileSync")]),s("span",{style:{color:"#24292E"}},"("),s("span",{style:{color:"#032F62"}},"'myfile.txt'"),s("span",{style:{color:"#24292E"}},", "),s("span",{style:{color:"#032F62"}},"'// TODO'"),s("span",{style:{color:"#24292E"}},")")])])])]),s("div",{class:"line-numbers-wrapper","aria-hidden":"true"},[s("span",{class:"line-number"},"1"),s("br")])]),s("div",{class:"language-md vp-adaptive-theme line-numbers-mode"},[s("button",{title:"Copy Code",class:"copy"}),s("span",{class:"lang"},"md"),s("pre",{class:"shiki github-dark-dimmed vp-code-dark"},[s("code",null,[s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"```ts twoslash")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#768390"}},"/// <"),s("span",{style:{color:"#8DDB8C"}},"reference"),s("span",{style:{color:"#768390"}}," "),s("span",{style:{color:"#6CB6FF"}},"types"),s("span",{style:{color:"#F47067"}},"="),s("span",{style:{color:"#96D0FF"}},'"node"'),s("span",{style:{color:"#768390"}}," />")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#768390"}},"// ---cut---")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#F47067"}},"import"),s("span",{style:{color:"#ADBAC7"}}," { writeFileSync } "),s("span",{style:{color:"#F47067"}},"from"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#96D0FF"}},"'fs'")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#DCBDFB"}},"writeFileSync"),s("span",{style:{color:"#ADBAC7"}},"("),s("span",{style:{color:"#96D0FF"}},"'myfile.txt'"),s("span",{style:{color:"#ADBAC7"}},", "),s("span",{style:{color:"#96D0FF"}},"'// TODO'"),s("span",{style:{color:"#ADBAC7"}},")")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"```")])])]),s("pre",{class:"shiki github-light vp-code-light"},[s("code",null,[s("span",{class:"line"},[s("span",{style:{color:"#24292E"}},"```ts twoslash")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#6A737D"}},"/// <"),s("span",{style:{color:"#22863A"}},"reference"),s("span",{style:{color:"#6A737D"}}," "),s("span",{style:{color:"#6F42C1"}},"types"),s("span",{style:{color:"#D73A49"}},"="),s("span",{style:{color:"#032F62"}},'"node"'),s("span",{style:{color:"#6A737D"}}," />")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#6A737D"}},"// ---cut---")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#D73A49"}},"import"),s("span",{style:{color:"#24292E"}}," { writeFileSync } "),s("span",{style:{color:"#D73A49"}},"from"),s("span",{style:{color:"#24292E"}}," "),s("span",{style:{color:"#032F62"}},"'fs'")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#6F42C1"}},"writeFileSync"),s("span",{style:{color:"#24292E"}},"("),s("span",{style:{color:"#032F62"}},"'myfile.txt'"),s("span",{style:{color:"#24292E"}},", "),s("span",{style:{color:"#032F62"}},"'// TODO'"),s("span",{style:{color:"#24292E"}},")")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#24292E"}},"```")])])]),s("div",{class:"line-numbers-wrapper","aria-hidden":"true"},[s("span",{class:"line-number"},"1"),s("br"),s("span",{class:"line-number"},"2"),s("br"),s("span",{class:"line-number"},"3"),s("br"),s("span",{class:"line-number"},"4"),s("br"),s("span",{class:"line-number"},"5"),s("br"),s("span",{class:"line-number"},"6"),s("br")])])])],-1),D=s("p",null,[l("APIs like "),s("a",{href:"https://vitest.dev",target:"_blank",rel:"noreferrer"},"Vitest"),l(" are similar cases where you would use a triple slash reference.")],-1),C=s("div",{class:"vp-code-group vp-adaptive-theme"},[s("div",{class:"tabs"},[s("input",{type:"radio",name:"group-VGNJq",id:"tab-eIeNP4L",checked:"checked"}),s("label",{for:"tab-eIeNP4L"},"output"),s("input",{type:"radio",name:"group-VGNJq",id:"tab-NtV9lV_"}),s("label",{for:"tab-NtV9lV_"},"markdown")]),s("div",{class:"blocks"},[s("div",{class:"language-ts vp-adaptive-theme active line-numbers-mode"},[s("button",{title:"Copy Code",class:"copy"}),s("span",{class:"lang"},"ts"),s("pre",{class:"shiki github-dark-dimmed twoslash lsp",style:{"background-color":"#22272e",color:"#adbac7"}},[s("div",{class:"language-id"},"ts"),s("div",{class:"code-container"},[s("code",null,[s("div",{class:"line"},[s("span",{style:{color:"#DCBDFB"}},[s("data-lsp",{lsp:"const test: any"},"test")]),s("span",{style:{color:"#ADBAC7"}},"("),s("span",{style:{color:"#96D0FF"}},"'my tests'"),s("span",{style:{color:"#ADBAC7"}},", () "),s("span",{style:{color:"#F47067"}},"=>"),s("span",{style:{color:"#ADBAC7"}}," {")]),s("div",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#DCBDFB"}},[s("data-lsp",{lsp:"const expect: ExpectStatic",style:{"border-bottom":"solid 2px lightgrey"}},"expect")]),s("span",{style:{color:"#ADBAC7"}},"("),s("span",{style:{color:"#96D0FF"}},"'hello'"),s("span",{style:{color:"#ADBAC7"}},")."),s("span",{style:{color:"#DCBDFB"}},[s("data-lsp",{lsp:"any"},"toEqual")]),s("span",{style:{color:"#ADBAC7"}},"("),s("span",{style:{color:"#96D0FF"}},"'hello'"),s("span",{style:{color:"#ADBAC7"}},")")]),s("div",{class:"meta-line"},[s("span",{class:"popover-prefix"},"      "),s("span",{class:"popover"},[s("div",{class:"arrow"}),l("const expect: ExpectStatic")])]),s("div",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"})")])])])]),s("pre",{class:"shiki github-light twoslash lsp",style:{"background-color":"#fff",color:"#24292e"}},[s("div",{class:"language-id"},"ts"),s("div",{class:"code-container"},[s("code",null,[s("div",{class:"line"},[s("span",{style:{color:"#6F42C1"}},[s("data-lsp",{lsp:"const test: any"},"test")]),s("span",{style:{color:"#24292E"}},"("),s("span",{style:{color:"#032F62"}},"'my tests'"),s("span",{style:{color:"#24292E"}},", () "),s("span",{style:{color:"#D73A49"}},"=>"),s("span",{style:{color:"#24292E"}}," {")]),s("div",{class:"line"},[s("span",{style:{color:"#24292E"}},"    "),s("span",{style:{color:"#6F42C1"}},[s("data-lsp",{lsp:"const expect: ExpectStatic",style:{"border-bottom":"solid 2px lightgrey"}},"expect")]),s("span",{style:{color:"#24292E"}},"("),s("span",{style:{color:"#032F62"}},"'hello'"),s("span",{style:{color:"#24292E"}},")."),s("span",{style:{color:"#6F42C1"}},[s("data-lsp",{lsp:"any"},"toEqual")]),s("span",{style:{color:"#24292E"}},"("),s("span",{style:{color:"#032F62"}},"'hello'"),s("span",{style:{color:"#24292E"}},")")]),s("div",{class:"meta-line"},[s("span",{class:"popover-prefix"},"      "),s("span",{class:"popover"},[s("div",{class:"arrow"}),l("const expect: ExpectStatic")])]),s("div",{class:"line"},[s("span",{style:{color:"#24292E"}},"})")])])])]),s("div",{class:"line-numbers-wrapper","aria-hidden":"true"},[s("span",{class:"line-number"},"1"),s("br")])]),s("div",{class:"language-md vp-adaptive-theme line-numbers-mode"},[s("button",{title:"Copy Code",class:"copy"}),s("span",{class:"lang"},"md"),s("pre",{class:"shiki github-dark-dimmed vp-code-dark"},[s("code",null,[s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"```ts twoslash")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#768390"}},"/// <"),s("span",{style:{color:"#8DDB8C"}},"reference"),s("span",{style:{color:"#768390"}}," "),s("span",{style:{color:"#6CB6FF"}},"types"),s("span",{style:{color:"#F47067"}},"="),s("span",{style:{color:"#96D0FF"}},'"vitest/globals"'),s("span",{style:{color:"#768390"}}," />")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#768390"}},"// ---cut---")]),l(`
`),s("span",{class:"line"}),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#DCBDFB"}},"test"),s("span",{style:{color:"#ADBAC7"}},"("),s("span",{style:{color:"#96D0FF"}},"'my tests'"),s("span",{style:{color:"#ADBAC7"}},", () "),s("span",{style:{color:"#F47067"}},"=>"),s("span",{style:{color:"#ADBAC7"}}," {")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#DCBDFB"}},"expect"),s("span",{style:{color:"#ADBAC7"}},"("),s("span",{style:{color:"#96D0FF"}},"'hello'"),s("span",{style:{color:"#ADBAC7"}},")."),s("span",{style:{color:"#DCBDFB"}},"toEqual"),s("span",{style:{color:"#ADBAC7"}},"("),s("span",{style:{color:"#96D0FF"}},"'hello'"),s("span",{style:{color:"#ADBAC7"}},")")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// ^?")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"})")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"```")])])]),s("pre",{class:"shiki github-light vp-code-light"},[s("code",null,[s("span",{class:"line"},[s("span",{style:{color:"#24292E"}},"```ts twoslash")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#6A737D"}},"/// <"),s("span",{style:{color:"#22863A"}},"reference"),s("span",{style:{color:"#6A737D"}}," "),s("span",{style:{color:"#6F42C1"}},"types"),s("span",{style:{color:"#D73A49"}},"="),s("span",{style:{color:"#032F62"}},'"vitest/globals"'),s("span",{style:{color:"#6A737D"}}," />")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#6A737D"}},"// ---cut---")]),l(`
`),s("span",{class:"line"}),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#6F42C1"}},"test"),s("span",{style:{color:"#24292E"}},"("),s("span",{style:{color:"#032F62"}},"'my tests'"),s("span",{style:{color:"#24292E"}},", () "),s("span",{style:{color:"#D73A49"}},"=>"),s("span",{style:{color:"#24292E"}}," {")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#24292E"}},"    "),s("span",{style:{color:"#6F42C1"}},"expect"),s("span",{style:{color:"#24292E"}},"("),s("span",{style:{color:"#032F62"}},"'hello'"),s("span",{style:{color:"#24292E"}},")."),s("span",{style:{color:"#6F42C1"}},"toEqual"),s("span",{style:{color:"#24292E"}},"("),s("span",{style:{color:"#032F62"}},"'hello'"),s("span",{style:{color:"#24292E"}},")")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#24292E"}},"    "),s("span",{style:{color:"#6A737D"}},"// ^?")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#24292E"}},"})")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#24292E"}},"```")])])]),s("div",{class:"line-numbers-wrapper","aria-hidden":"true"},[s("span",{class:"line-number"},"1"),s("br"),s("span",{class:"line-number"},"2"),s("br"),s("span",{class:"line-number"},"3"),s("br"),s("span",{class:"line-number"},"4"),s("br"),s("span",{class:"line-number"},"5"),s("br"),s("span",{class:"line-number"},"6"),s("br"),s("span",{class:"line-number"},"7"),s("br"),s("span",{class:"line-number"},"8"),s("br"),s("span",{class:"line-number"},"9"),s("br")])])])],-1);function A(F,v,B,w,E,k){const e=o;return n(),t("div",null,[i,r(e,{readTime:"1",words:"230"}),p,y,d,u,f,m,g,h,b,D,C])}const O=a(c,[["render",A]]);export{T as __pageData,O as default};
