GramJS: Fix raw vector types (#4320)

This commit is contained in:
Alexander Zinchuk 2024-03-01 14:02:41 -05:00
parent 0eecca4fb9
commit fd62fdeba0
2 changed files with 6 additions and 6 deletions

View File

@ -12603,7 +12603,7 @@ namespace Api {
};
export class GetIsPremiumRequiredToContact extends Request<Partial<{
id: Api.TypeInputUser[];
}>, Bool> {
}>, Bool[]> {
id: Api.TypeInputUser[];
};
}

View File

@ -106,22 +106,22 @@ ${indent}};`.trim()
function renderValueType(type, isVector, isTlType) {
if (RAW_TYPES.has(type)) {
return type
return isVector ? `${type}[]` : type;
}
let resType
if (typeof type === 'string' && isTlType) {
resType = renderTypeName(type)
resType = renderTypeName(type);
} else {
resType = type
resType = type;
}
if (isVector) {
resType = `${resType}[]`
resType = `${resType}[]`;
}
return resType
return resType;
}
function renderTypeName(typeName) {