Answer the question
In order to leave comments, you need to log in
How to initialize an empty variable?
When a function is called, the variable is initialized, but the value is assigned to it later. This causes ts to throw an error. If I specify an alternative type sheets_v4.Sheets | undefined, then in the future, when calling the client properties, an error occurs again, because undefined cannot have properties.
let client: sheets_v4.Sheets
// ....
client = ...
Property 'client' has no initializer and is not definitely assigned in the constructor
Answer the question
In order to leave comments, you need to log in
I would move
JOIN users S on S.id=IF(93=sender_id, sender_id, recipient_id)
JOIN users R on R.id=IF(93=recipient_id, sender_id, recipient_id)
Logic of these ifs from request to processing...
JOIN users S on S.id=IF(93=sender_id, sender_id, recipient_id)
JOIN users R on R.id=IF(93=recipient_id, sender_id, recipient_id)
let client
// ....
client = ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question