Publish types for custom middleware and task developers

未關閉
#651 8 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 2 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
typescript
領域
tooling

研究方向

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.

由索引模型根據 Issue 內容生成。

描述

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.

主要語言
JavaScript
星號
510
分支
80
平均合併
2 天 22 小時
30 天內合併 PR
12

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

UI5/cli 的其他 Issue

查看 UI5/cli 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。