Open
Description
I am using twoslash
with Vitepress
and my example codes require me to document my own library. so when I try the following example code:
import { PlainWeekDate } from '../../src'
import { Temporal } from '@js-temporal/polyfill'
//---cut---
const weekDate = PlainWeekDate.from({ yearOfWeek: 2021, weekOfYear: 1, dayOfWeek: 1, }) // [!code highlight]
console.log(weekDate.toString()) // 2021-W01-01
console.log(weekDate.toPlainDate().toString()) // 2021-01-04
const plainDate = Temporal.PlainDate.from({ year: 2021, month: 1, day: 4 }) // [!code highlight]
const weekDate2 = PlainWeekDate.from(plainDate) // [!code highlight]
console.log(weekDate2.toString()) // 2021-W01-01
I get this error
Cannot find module '../../src' or its corresponding type declarations.
twoslash
seems to recognise my second import from @js-temporal/polyfill
but not the first one which is coming from my own code. What's the best way to fix this?
Metadata
Assignees
Labels
No labels