foobar
foobar5d ago

deno publish / slow type

When I try to publish a package on JSR, I have the foolowing error
TS2304 [ERROR]: Cannot find name 'down'.
*/ export const transformScale = (...[monetaObject, newScale, divide = down]: TransformScaleParams): Moneta =>({} as never);
TS2304 [ERROR]: Cannot find name 'down'.
*/ export const transformScale = (...[monetaObject, newScale, divide = down]: TransformScaleParams): Moneta =>({} as never);
Is it normal ? down is declared Source code : https://github.com/b-life-org/moneta
import { computeBase, Moneta } from "../../mod.ts";
import { DivideOperation } from "../types/types.ts";
import { down } from "../divide/down.ts";

export type TransformScaleParams = readonly [
dineroObject: Moneta,
newScale: number,
divide?: DivideOperation,
];

export const transformScale = (
...[monetaObject, newScale, divide = down]: TransformScaleParams
): Moneta => {}
import { computeBase, Moneta } from "../../mod.ts";
import { DivideOperation } from "../types/types.ts";
import { down } from "../divide/down.ts";

export type TransformScaleParams = readonly [
dineroObject: Moneta,
newScale: number,
divide?: DivideOperation,
];

export const transformScale = (
...[monetaObject, newScale, divide = down]: TransformScaleParams
): Moneta => {}
GitHub
GitHub - b-life-org/moneta: Moneta lets you create, calculate, and ...
Moneta lets you create, calculate, and format money safely in JavaScript and TypeScript. - b-life-org/moneta
3 Replies
Christian Siegert
Does restarting your IDE help?
foobar
foobarOP5d ago
I have got the message with Deno CLI deno publish
foobar
foobarOP4d ago
deno publish don't accept imported function as default parameter I have reported a bug here but maybe it comes from Typescript check https://github.com/denoland/deno/issues/27575
GitHub
deno publish / don't accept imported function as default parameter ...
Version: Deno 2.1.4 when I try to deno publish with the following code, i have the error TS2304 [ERROR]: Cannot find name 'add'. export const useFn = (...[a, b, fn = add]: [bigint, bigint, ...

Did you find this page helpful?