You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(dts-generator): detect broken method names and throw error
Writing a method name like
MyModule[SomeEnum.EnumValue] = async function (param) {
in the UI5 source code led to a method name "undefined]" in api.json,
which led to a broken dts file and all kinds of unrelated tsc errors.
While it should have been detected earlier, it does not hurt to check
some names here.
Copy file name to clipboardExpand all lines: packages/dts-generator/docs/TECHNICAL.md
+1
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,7 @@ The generator works in several phases, which are reflected as modules in [`src/p
44
44
Using `directives` as input and the information whether modules or globals should be generated, this phase does plenty of adjustments in the original api.json files:
45
45
46
46
-`mergeOverlays` merges in the overlays from directives
47
+
-`validateNames` does some rudimentary sanity checks for real-world issues which are otherwise hard to debug
47
48
-`substituteSapClassInfoTypedef` adds the sap.ClassInfo typedef
48
49
-`convertCoreAndConfigurationIntoANamespace` converts `sap.ui.core.Core` and `sap.ui.core.Configuration` from a class (needed as such in the SDK) into a namespace because the module export of both is an _instance_, not the class
49
50
-`moveTypeParametersFromConstructorToClass` moves any type parameters from a class's constructor to the class itself. It is more common to build a generic class than building a constructor that has a generic parameter. Newer versions of UI5 (starting with 1.113) will already export the api.json like that, the code in `moveTypeParametersFromConstructorToClass` can handle this.
0 commit comments