1
0
mirror of synced 2026-05-22 18:53:15 +00:00

chore: resolve Object langAliases in function argument types (#1908)

This commit is contained in:
Yury Semikhatsky
2026-04-09 13:50:18 -07:00
committed by GitHub
parent 7dbd6cac3b
commit b01bf64e64
3 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -10,7 +10,7 @@
<name>Playwright Client Examples</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<playwright.version>1.58.0</playwright.version>
<playwright.version>1.59.0</playwright.version>
</properties>
<dependencies>
<dependency>
+1 -1
View File
@@ -1 +1 @@
1.59.1-beta-1775752988000
1.59.1-beta-1775762078000
@@ -506,6 +506,12 @@ class TypeRef extends Element {
if (customType != null) {
return customType;
}
// Inner Objects (e.g. function arguments) are not visited by createClassesAndEnums,
// so resolve their Java type name from langAliases here.
String alias = javaAlias(jsonType);
if (alias != null) {
return alias;
}
return "Map<" + convertTemplateParams(jsonType) + ">";
}
if ("Map".equals(name)) {
@@ -525,9 +531,6 @@ class TypeRef extends Element {
if ("WebSocketRoute.onClose.handler".equals(jsonPath)) {
return "BiConsumer<Integer, String>";
}
if ("Screencast.start.options.onFrame".equals(jsonPath)) {
return "Consumer<ScreencastFrame>";
}
if (jsonType.getAsJsonArray("args").size() == 1) {
String paramType = convertBuiltinType(jsonType.getAsJsonArray("args").get(0).getAsJsonObject());
if (!jsonType.has("returnType") || jsonType.get("returnType").isJsonNull()) {