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
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:
Elyra canvas should have TypeScript support either through an alternative build-phase addition (rollup TypeScript) or
External d.ts files such as above linked into rollup and/or
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: