You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: JavaScript target IDL type object exports and factory function deprecations (#665)
**Overview**
The JavaScript target would be more useful (especially to Azle
developers) if it exported the IDL type objects that it generates. We
also no longer need the factory functions as of `3.0.0`, thus we will
mark them deprecated and provide direct exports for that previous
functionality.
**Requirements**
The JavaScript target should export all of the IDL type objects,
including the generated `IDL.Service` and `init args`, without the need
to use a factory function.
**Considerations**
There are no breaking changes besides some formatting of the generated
JavaScript files. The `idflFactory` and `init` functions have been
marked as deprecated but not removed. Developers can choose to import
the `IDL` type objects now, but they are not forced to. This is mainly
an ergonomic change with deprecations to prepare for a future with the
best developer experience by default.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,8 @@
15
15
16
16
* Non-breaking changes:
17
17
+ Added `pp_named_args`, `pp_named_init_args` in `pretty::candid` module.
18
+
+ The `JavaScript``didc` target now exports its generated IDL type objects.
19
+
+ The `JavaScript` and `TypeScript``didc` targets now export `idlService` and `idlInitArgs` (non-factory-function altneratives to `idlFactory` and `init`).
0 commit comments