fix(twitter-client): relax cursor typing
This commit is contained in:
@@ -928,10 +928,7 @@ export class TwitterClient {
|
|||||||
instructions:
|
instructions:
|
||||||
| Array<{
|
| Array<{
|
||||||
entries?: Array<{
|
entries?: Array<{
|
||||||
content?: {
|
content?: unknown;
|
||||||
cursorType?: string;
|
|
||||||
value?: string;
|
|
||||||
};
|
|
||||||
}>;
|
}>;
|
||||||
}>
|
}>
|
||||||
| undefined,
|
| undefined,
|
||||||
@@ -939,7 +936,7 @@ export class TwitterClient {
|
|||||||
): string | undefined {
|
): string | undefined {
|
||||||
for (const instruction of instructions ?? []) {
|
for (const instruction of instructions ?? []) {
|
||||||
for (const entry of instruction.entries ?? []) {
|
for (const entry of instruction.entries ?? []) {
|
||||||
const content = entry.content;
|
const content = entry.content as { cursorType?: unknown; value?: unknown } | undefined;
|
||||||
if (content?.cursorType === cursorType && typeof content.value === 'string' && content.value.length > 0) {
|
if (content?.cursorType === cursorType && typeof content.value === 'string' && content.value.length > 0) {
|
||||||
return content.value;
|
return content.value;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user