Consider exporting all coders.
Describe the Feature
I want to change some functions of coders to implement some functionalities. But when I try to import like this:
import { AddressCoder } from "ethers/lib.esm/abi/coders/address.js";
It report Error [ERR_PACKAGE_PATH_NOT_EXPORTED]. So please consider exporting all coders in index.ts.
Code Example
In `src.ts/abi/index.ts`:
export { Coder, Reader } from './coders/abstract-coder.js';
export { AddressCoder } from "./coders/address.js";
export { ArrayCoder } from "./coders/array.js";
export { BooleanCoder } from "./coders/boolean.js";
export { BytesCoder } from "./coders/bytes.js";
export { FixedBytesCoder } from "./coders/fixed-bytes.js";
export { NullCoder } from "./coders/null.js";
export { NumberCoder } from "./coders/number.js";
export { StringCoder } from "./coders/string.js";
export { TupleCoder } from "./coders/tuple.js";
Ive been considering adding this using the exports; so it would be something to the effect of import { NumberCoder } from "ethers/abi".
Ive been considering adding this using the
exports; so it would be something to the effect ofimport { NumberCoder } from "ethers/abi".
Thank you!
Ive been considering adding this using the
exports; so it would be something to the effect ofimport { NumberCoder } from "ethers/abi".
When will this feature publish? I've been waiting for it for nearly a month.
Sorry. I'm still working on the next minor release, which this will go out in. I'm also planning to make the export prefixed with an underscore _ since it will be somewhat experimental.
Sorry. I'm still working on the next minor release, which this will go out in. I'm also planning to make the export prefixed with an underscore
_since it will be somewhat experimental.
I think it's better not to add it because the export doesn't conflict with other code. But the underscore is acceptable if you are planning to change some coders in the future.