Commit 095bae6
authored
fix(dts-generator): support rest parameters in functions in nested types (#507)
1.)
When no param and no return type is given, generate "Function" instead
of "()=>void" to allow passing parameters, just like it happens in
simple function types.
2.)
When api.json contains:
Object<string,function(...any)>|function
Then the d.ts file will contain:
Record<string, (...p1: any) => void> | Function;
Before this fix, the function had no parameter.1 parent b6c0fe5 commit 095bae6
File tree
3 files changed
+21
-9
lines changed- packages/dts-generator/src
- phases
- utils
- test-packages/openui5-snapshot-test/output-dts
3 files changed
+21
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
867 | 867 | | |
868 | 868 | | |
869 | 869 | | |
870 | | - | |
871 | | - | |
872 | | - | |
873 | | - | |
874 | | - | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
875 | 888 | | |
876 | | - | |
877 | | - | |
878 | 889 | | |
879 | 890 | | |
880 | 891 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83938 | 83938 | | |
83939 | 83939 | | |
83940 | 83940 | | |
83941 | | - | |
| 83941 | + | |
83942 | 83942 | | |
83943 | 83943 | | |
83944 | 83944 | | |
83945 | | - | |
| 83945 | + | |
83946 | 83946 | | |
83947 | 83947 | | |
83948 | 83948 | | |
| |||
0 commit comments