-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
The init
function generated by Candid IDL is handy when deploying a canister in JavaScript (whether for real deployments or during tests with picJS
).
Currently, this function is not exposed in the .d.ts
files of all packages in ic-js
.
import type { IDL } from "@dfinity/candid";
export const idlFactory: IDL.InterfaceFactory;
This limitation can be overcome with a workaround:
// @ts-expect-error init is not packaged / exposed
import { idlFactory, init } from '@dfinity/ledger-icp/dist/candid/ledger.idl.js';
However, it would improve the developer experience to have it exposed directly.
Metadata
Metadata
Assignees
Labels
No labels