[dts-generator] Feature Request: TypeScript Interface Generation for UI5 Runtime Types

Abierto
#524 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
30/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
typescript

Línea de trabajo

Start by reviewing the existing IUI5DefineDependencyNames mechanism and the dts-generator entry points. Compare the proposed metadata typing and BaseObject.isA()/isObjectA() cases, including possible .dtsgenrc or JSDoc inputs. Done would require an agreed generation design and comprehensive completion support for the listed UI5 symbols.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement ts-interface-generator

TypeScript Interface Generation for UI5 Runtime Types

We (as in the UI5 framework runtime team, incl. @codeworrior) would like to request support for generating TypeScript interfaces that contain all runtime UI5 class and interface names to improve code completion.

Motivation

Currently, there's an existing IUI5DefineDependencyNames mechanism used for APIs like sap.ui.require|define. We'd like to extend this concept to provide comprehensive TypeScript support for other parts of UI5 application and control develop.

Proposed Features

We see two different variants for better code completion based on a full automatically generated list of all available symbols (is that the correct word...?):

1. UI5 Metadata Typing
  • All places where interface or class names can be used
    • i.e. the interfaces array and the aggregation types
  • Additionally we think support for data type names would be great, particularly for enums used in control properties
2. Enhanced BaseObject Methods

On top of the UI5 metadata, the runtime offers APIs for type inference:

  • BaseObject#isA() - Provide type completion for class names and interfaces
  • BaseObject.isObjectA() - Provide type completion for class names and interfaces

Additional info

For the UI5 framework itself, we're (again the framework team ;)) are exploring how we can define the above mentioned APIs and places declaratively. Though we have no further information on that yet, we have discussed to provide a form of marking via either

  • .dtsgenrc files in the resp. libraries, or
  • JSDoc annotations

Expected Behavior

Developers should be able to get full code completion support when working with UI5 class names, interface names, metadata properties and so on. We envision something similar to the existing support for dependency names in sap.ui.require|define calls (refer to IUI5DefineDependencyNames mentioned above).

Lenguaje dominante
TypeScript
Estrellas
213
Forks
35
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de UI5/typescript

Todos los issues de UI5/typescript

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.