-
-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typings not being loaded for "dedent" NPM package #576
Comments
having the same issue with dayjs. when importing from 'npm:' the types work. import dayjs from "https://esm.sh/v113/[email protected]";
import relativeTime from "https://esm.sh/v113/[email protected]/plugin/relativeTime.js";
dayjs.extend(relativeTime);
// @ts-ignore Deno doesn't recognize the function fromNow
const ago = dayjs(props.time * 1000).fromNow(); |
@heyajulia but seems there is no |
@echoptic this is known issue, because currently the dts transformer can handle module extend well // esm.sh ignores below types
declare module 'dayjs' {
interface Dayjs {
fromNow(withoutSuffix?: boolean): string
from(compared: ConfigType, withoutSuffix?: boolean): string
toNow(withoutSuffix?: boolean): string
to(compared: ConfigType, withoutSuffix?: boolean): string
}
} i will fix it later |
@ije I'm interested in helping somehow if possible. Is there a related issue open for this? |
I see that's true; I did not know that was a requirement. I'm guessing Skypack tries to look for (and finds) |
|
Failing module
Error message
There's no error message per se, but typings are not loaded, so the function typed as
any
when I mouse over it in Visual Studio Code (even though typings are available). As a workaround, I'm using https://cdn.skypack.dev/[email protected]?dts, which does work as expected.Additional info
The text was updated successfully, but these errors were encountered: