Closed ghoshnirmalya closed 3 years ago
I ran twoslash-cli on a markdown file with the following content and got a similar error:
```ts twoslash
interface IdLabel {id: number, /* some fields */ }
interface NameLabel {name: string, /* other fields */ }
type NameOrId<T extends number | string> = T extends number ? IdLabel : NameLabel;
// This comment should not be included
// ---cut---
function createLabel<T extends number | string>(idOrName: T): NameOrId<T> {
throw "unimplemented"
}
let a = createLabel("typescript");
<img width="1680" alt="Screenshot 2021-09-01 at 11 55 16 PM" src="https://user-images.githubusercontent.com/6391763/131723941-c0d34209-5f55-4069-b2a5-d8f5ea7ae47f.png">
Interesting, that doesn't look like an error message I have wrote - perhaps it lives at shiki level?
@orta Thank you for your reply. Should I close this and create a new issue in the Shiki repository?
Nope. This is an error from within remark-shiki-twoslash
. Not sure why. I'll get back to this after work hours.
The highlighting is working fine when I'm rendering the following content:
It is also working fine when I'm rendering the following content:
However, I'm getting the error The "path" argument must be of type string. Received an instance of Array when I'm trying to render the following content: