-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add module TypeScript definitions and compatibilty #1320
Labels
Comments
@phooning I am interested in a PR for this. I tried to look at the definition implementation that you shared, however, the link no longer works (https://github.com/phooning/canvas-ts/blob/main/%40elyra/index.ts). Please can you reshare the link, so that we don't overlap efforts. Thanks. |
samueldmeyer
added a commit
to samueldmeyer/canvas
that referenced
this issue
Dec 20, 2024
samueldmeyer
added a commit
to samueldmeyer/canvas
that referenced
this issue
Dec 20, 2024
samueldmeyer
added a commit
to samueldmeyer/canvas
that referenced
this issue
Dec 20, 2024
samueldmeyer
added a commit
to samueldmeyer/canvas
that referenced
this issue
Dec 20, 2024
Signed-off-by: Samuel Meyer <[email protected]>
samueldmeyer
added a commit
to samueldmeyer/canvas
that referenced
this issue
Dec 20, 2024
Signed-off-by: Samuel Meyer <[email protected]>
samueldmeyer
added a commit
to samueldmeyer/canvas
that referenced
this issue
Jan 8, 2025
Signed-off-by: Samuel Meyer <[email protected]>
samueldmeyer
added a commit
to samueldmeyer/canvas
that referenced
this issue
Jan 8, 2025
Signed-off-by: Samuel Meyer <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ref: 3825
Overview
Projects using
@elyra/canvas
are not able to read and import modules if using TypeScript - at best, modules and functions will be unknown. I propose adding TypeScript definitions to modernize the canvas and make it friendlier for JSDoc support, future project adoption, and maintainability.I've taken the liberty to create an definition implementation here: https://github.com/phooning/canvas-ts/blob/main/%40elyra/index.ts
Where we've attempted to define function output, arguments, interfaces, and types throughout the canvas as well as appending the appropriate documentation as a JS/TSDoc comment, markdown formatted, above the function for the user to see.
As an experimental end result by using vitejs and rebuilding the canvas, I was able to alias type definitions under another namespace to import and read into TypeScript React projects and frameworks.
Example JSDoc compatibility after building with TypeScript comments:
I would be happy to help work and PR this with whoever might be interested!
Todos:
Node<T>
)The text was updated successfully, but these errors were encountered: