UI5 / UI5/cli

Publish types for custom middleware and task developers

Open
#651 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
511
Forks
83
Avg merge
1d 5h
Merged PRs (30d)
55

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the public APIs in the UI5 tooling packages named in the issue, especially @ui5/fs and @ui5/builder, alongside the documented Resource and DuplexCollection APIs. Identify the types needed by custom tasks and middlewares; done means consumers can import maintained TypeScript types instead of defining local declarations.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.