You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{zora}from"viem/chains";import{http,createPublicClient}from"viem";exportconstpublicClient=createPublicClient({// this will determine which chain to interact withchain: zora,transport: http(),});
and another snippet that imports that code at docs/snippets/example.ts:
example.ts
[2305] 107 - Module '"./config"' has no exported member 'publicClient'.
If I inline that code, the issue goes away:
It seems like the only way to get the issue to go away while being able to import the file is explicitly setting the external files inline, like:
Would it be possible to pass through the included files from the codegroup to included files?
Or is there another recommended approach for including snippets that include other snippets?
The text was updated successfully, but these errors were encountered:
You can see a full example of this reprod in this repository
Given I have two snippets:
docs/snippets/config.ts
:and another snippet that imports that code at
docs/snippets/example.ts
:I'm attempting to import both with vocs, and use twoslash but run into issues.
Ideally I can have the markdown look like this:
But this results in a twoslash error:
Cannot find module './config' or its corresponding type declarations.
If I try to add twoslash include instructions to
example.ts
like:I get an error:
If I inline that code, the issue goes away:
It seems like the only way to get the issue to go away while being able to import the file is explicitly setting the external files inline, like:
Would it be possible to pass through the included files from the codegroup to included files?
Or is there another recommended approach for including snippets that include other snippets?
The text was updated successfully, but these errors were encountered: