We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
readonly
The code that's generated does not use readonly in places where it should:
export declare class BatchGetAccountsRequest extends pb_1.Message { #private; constructor(data?: any[] | { ids?: string[]; }); get ids(): string[]; set ids(value: string[]); static fromObject(data: { ids?: string[]; }): BatchGetAccountsRequest; toObject(): { ids?: string[]; }; serialize(): Uint8Array; serialize(w: pb_1.BinaryWriter): void; static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BatchGetAccountsRequest; serializeBinary(): Uint8Array; static deserializeBinary(bytes: Uint8Array): BatchGetAccountsRequest; }
All parameters should declare their arrays as readonly to work with the following example code:
getByIds(ids: readonly string[]): Promise<Account[]> { return this.client .BatchGetAccounts(new BatchGetAccountsRequest({ ids })) .then((res) => res.accounts.map(accountGrpcToJs)); }
The type 'readonly string[]' is 'readonly' and cannot be assigned to the mutable type 'string[]'.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
The code that's generated does not use
readonly
in places where it should:All parameters should declare their arrays as
readonly
to work with the following example code:The type 'readonly string[]' is 'readonly' and cannot be assigned to the mutable type 'string[]'.
The text was updated successfully, but these errors were encountered: