GramJS: Fix raw vector types (#4320)
This commit is contained in:
parent
0eecca4fb9
commit
fd62fdeba0
2
src/lib/gramjs/tl/api.d.ts
vendored
2
src/lib/gramjs/tl/api.d.ts
vendored
@ -12603,7 +12603,7 @@ namespace Api {
|
|||||||
};
|
};
|
||||||
export class GetIsPremiumRequiredToContact extends Request<Partial<{
|
export class GetIsPremiumRequiredToContact extends Request<Partial<{
|
||||||
id: Api.TypeInputUser[];
|
id: Api.TypeInputUser[];
|
||||||
}>, Bool> {
|
}>, Bool[]> {
|
||||||
id: Api.TypeInputUser[];
|
id: Api.TypeInputUser[];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -106,22 +106,22 @@ ${indent}};`.trim()
|
|||||||
|
|
||||||
function renderValueType(type, isVector, isTlType) {
|
function renderValueType(type, isVector, isTlType) {
|
||||||
if (RAW_TYPES.has(type)) {
|
if (RAW_TYPES.has(type)) {
|
||||||
return type
|
return isVector ? `${type}[]` : type;
|
||||||
}
|
}
|
||||||
|
|
||||||
let resType
|
let resType
|
||||||
|
|
||||||
if (typeof type === 'string' && isTlType) {
|
if (typeof type === 'string' && isTlType) {
|
||||||
resType = renderTypeName(type)
|
resType = renderTypeName(type);
|
||||||
} else {
|
} else {
|
||||||
resType = type
|
resType = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isVector) {
|
if (isVector) {
|
||||||
resType = `${resType}[]`
|
resType = `${resType}[]`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return resType
|
return resType;
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderTypeName(typeName) {
|
function renderTypeName(typeName) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user