Skip to content

JS target improvements #1

@lastmjs

Description

@lastmjs

I want you to export all of the IDL type objects from the JS target. I also want you to use the JSDoc @deprecated tag to make the idlFactory and init functions deprecated.

You will need to import IDL from @dfinity/candid at the top of the file. Make sure the imports are in alphabetical order.

Add tests in the appropriate places. Remember, the purpose of this PR is simply marking the IDL factory functions as deprecated, and then exporting the IDL objects from the module. All of this is to be done in the JS target. No other targets should be touched.

The motivation is to move away from the IDL factory functions, allowing developers to import IDL from @dfinity/candid anywhere they'd like. There was a bug that made importing IDL from other places error-prone in the past, thus the factory asking users to pass in their own IDL object. That is now obsolete.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions