Skip to content
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

JSDocs got lost during transpilation #103

Open
pinussilvestrus opened this issue Oct 5, 2021 · 3 comments
Open

JSDocs got lost during transpilation #103

pinussilvestrus opened this issue Oct 5, 2021 · 3 comments
Labels
backlog Queued in backlog bug Something isn't working documentation Improvements or additions to documentation spring cleaning Could be cleaned up one day

Comments

@pinussilvestrus
Copy link
Contributor

pinussilvestrus commented Oct 5, 2021

Describe the Bug

When building the core components (npm run build), the JSDoc comments got lost. As an example, given the Simple component.

/**
 * @param {Object} props
 * @param {Function} props.debounce
 * @param {Boolean} [props.disabled]
 * @param {Object} props.element
 * @param {Function} props.getValue
 * @param {String} props.id
 * @param {Function} [props.onBlur]
 * @param {Function} [props.onFocus]
 * @param {Function} props.setValue
 */
export default function Simple(props) {
  // ...
}

it resolves in weird transpilation changes (imports were places after the comments)

/**
 * @param {Object} props
 * @param {Function} props.debounce
 * @param {Boolean} [props.disabled]
 * @param {Object} props.element
 * @param {Function} props.getValue
 * @param {String} props.id
 * @param {Function} [props.onBlur]
 * @param {Function} [props.onFocus]
 * @param {Function} props.setValue
 */

import { jsx as _jsx } from "preact/jsx-runtime";
export default function Simple(props) {
  // ...
}

Steps to Reproduce

  1. Execute npm run build
  2. Use one component downstream (example Simple)
  3. See that there are no information regarding props anymore (props: any)

image

Expected Behavior

JSDoc comment stays where they are and can be consumed in downstream projects after transpilation.

image

An alternative could be to use type linting for that (cf. #65).

Environment

  • Host (Browser/Node version), if applicable: Chrome 94
  • OS: macOS 11.5
  • Library version: 0.4.2

Also related to bpmn-io/bpmn-properties-panel#111 (comment)

@pinussilvestrus pinussilvestrus added bug Something isn't working spring cleaning Could be cleaned up one day labels Oct 5, 2021
@pinussilvestrus
Copy link
Contributor Author

pinussilvestrus commented Oct 5, 2021

Maybe related: babel/babel#8507 + babel/babel#8437

@pinussilvestrus pinussilvestrus added the ready Ready to be worked on label Oct 7, 2021 — with bpmn-io-tasks
@pinussilvestrus
Copy link
Contributor Author

Moving it to ready because I think that's needed as a minimum to provide proper editor support when using this library.

@pinussilvestrus pinussilvestrus changed the title JSDoc's got lost during transpilation JSDocs got lost during transpilation Oct 7, 2021
@nikku nikku added backlog Queued in backlog and removed ready Ready to be worked on labels Oct 21, 2021 — with bpmn-io-tasks
@nikku
Copy link
Member

nikku commented Oct 21, 2021

Moving it to backlog. Let us see how it impacts plug-in development and reconsider the priority on this one then.

@nikku nikku added the documentation Improvements or additions to documentation label Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Queued in backlog bug Something isn't working documentation Improvements or additions to documentation spring cleaning Could be cleaned up one day
Development

No branches or pull requests

2 participants