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

Publish types for custom middleware and task developers #651

Open
tobiasqueck opened this issue Sep 23, 2022 · 8 comments
Open

Publish types for custom middleware and task developers #651

tobiasqueck opened this issue Sep 23, 2022 · 8 comments
Labels
enhancement New feature or request

Comments

@tobiasqueck
Copy link

Is your feature request related to a problem? Please describe.

We as the maintainer of the in SAP Fiori tools and the Open UX tools (https://github.com/SAP/open-ux-tools) develop multiple custom tasks and middlewares. Our development language of choice is typescript, however, there are no types available for the API that is to be implemented by custom tasks and middlewares.

Describe the solution you'd like

It would be great if all the required types are part of the UI5 tooling packages @ui5/fs, @ui5/builder and so on, so that I can import the types in my modules and have all the comforts of using a fully typed language.

Describe alternatives you've considered

The best alternative so far is to read your documentation and manually define the types in a separate .d.ts file e.g.

declare module '@ui5/fs' {
    /**
     * https://sap.github.io/ui5-tooling/api/module-@ui5_fs.Resource.html
     */
    export class Resource {
        /**
         * Gets the resources path
         */
        getPath(): string;

        /**
         * Gets a buffer with the resource content.
         */
        getBuffer(): Promise<Buffer>;
    }

    /**
     * https://sap.github.io/ui5-tooling/api/module-@ui5_fs.DuplexCollection.html
     */
    export class DuplexCollection {
        /**
         *
         */
        byGlob(virPattern: string | string[], options?: object): Promise<Resource[]>;
    }
}

but that is of course not a good solution since we now need to make sure that our types stay in sync with your development.

Additional context

No.

@flovogt
Copy link
Member

flovogt commented Jun 27, 2023

Thanks a lot @tobiasqueck. This enhancement request will be covered in backlog item CPOUI5FOUNDATION-547.

@tobiasqueck
Copy link
Author

Thanks a lot @tobiasqueck. This enhancement request will be covered in backlog item CPOUI5FOUNDATION-547.

Happy to hear that. Do you also have a rough timeline?

@RandomByte
Copy link
Member

@ecker

@ecker
Copy link
Contributor

ecker commented Jun 28, 2023

Hi @tobiasqueck, we don't have a timeline, yet. Back then, it was clear to only be a target after UI5 Tooling 3.0 and some larger (ongoing) topics. Once we revised your topic, maybe in context of other TS enablements, we'll get back to you, thanks.

@ThePlenkov
Copy link

Hi! It would be really nice to have UI5 tooling covered with types. TypeScript is more than code suggestion.
Moreover I see you spend quite some time in JSDoc. Using Typescript will help you to write much simpler and cleaner code and code suggestion will be only one of the features available out of the box.
But since you have JSDoc - you may consider Types generation out of them.

@flovogt
Copy link
Member

flovogt commented Aug 2, 2023

@ThePlenkov We have this feature already in our backlog CPOUI5FOUNDATION-547. But no timeline yet when it will be available.

@ThePlenkov
Copy link

@flovogt thanks for a quick reply, Florian. This ticket you're referencing to - is it a public backlog or internal? Thanks!

@flovogt
Copy link
Member

flovogt commented Aug 2, 2023

You're welcome. Its an internal backlog managing system. Putting the backlog reference here makes our life easier to identify features are not yet prepared and planned in our internal system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants