Ciantic
Ciantic
Explore posts from servers
DDeno
Created by Ciantic on 10/27/2024 in #help
Vinxi build is trying to run node.exe instead of deno.exe?
I don't know should we have bug in Deno as well
4 replies
DDeno
Created by Ciantic on 10/27/2024 in #help
Vinxi build is trying to run node.exe instead of deno.exe?
4 replies
DDeno
Created by Ciantic on 10/27/2024 in #help
Vinxi build is trying to run node.exe instead of deno.exe?
I think this would require the bun like --bun switch
4 replies
DDeno
Created by Ciantic on 10/23/2024 in #help
Vinxi project such as solid-start doesn't work with Deno 2.0
4 replies
DDeno
Created by Ciantic on 3/7/2023 in #help
Date-fns typings don't work?
there is also some weird namespace involved for each function
7 replies
DDeno
Created by Ciantic on 3/7/2023 in #help
Date-fns typings don't work?
I think it's issue with their typings.d.ts it uses declare module:
declare module 'date-fns' {
export type Interval = IntervalAliased

export type Locale = LocaleAliased

export type Duration = DurationAliased

export type Day = DayAliased
}

// Regular Functions

declare module 'date-fns' {
function add(date: Date | number, duration: Duration): Date
namespace add {}

function addBusinessDays(date: Date | number, amount: number): Date
namespace addBusinessDays {}
//...
declare module 'date-fns' {
export type Interval = IntervalAliased

export type Locale = LocaleAliased

export type Duration = DurationAliased

export type Day = DayAliased
}

// Regular Functions

declare module 'date-fns' {
function add(date: Date | number, duration: Duration): Date
namespace add {}

function addBusinessDays(date: Date | number, amount: number): Date
namespace addBusinessDays {}
//...
Somehow deno and esm.sh can't understand that.
7 replies
DDeno
Created by Ciantic on 3/7/2023 in #help
Date-fns typings don't work?
Interestingly this works:
import { startOfDay } from "npm:date-fns";

// Gives out Error CORRECTLY
let foo = startOfDay("foo");
import { startOfDay } from "npm:date-fns";

// Gives out Error CORRECTLY
let foo = startOfDay("foo");
7 replies
DDeno
Created by Ciantic on 3/7/2023 in #help
Date-fns typings don't work?
I also tried this: https://cdn.skypack.dev/date-fns?dts as import, but it too doesn't give right types
7 replies