mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-21 15:15:48 +02:00
Fix JSDoc issues
This commit is contained in:
parent
3939c2263a
commit
4751a948e7
Resources/Content
@ -136,7 +136,7 @@ if (!("TD" in window)) {
|
||||
* @property {Class} TwitterActionRetweetedInteraction
|
||||
* @property {Class<TwitterClient>} TwitterClient
|
||||
* @property {Class<TwitterConversation>} TwitterConversation
|
||||
* @property {Class} TwitterConversationMessageEvent
|
||||
* @property {Class<TwitterConversationMessageEvent>} TwitterConversationMessageEvent
|
||||
* @property {TwitterMedia_Class} TwitterMedia
|
||||
* @property {Class<TwitterStatus>} TwitterStatus
|
||||
* @property {Class<TwitterUser>} TwitterUser
|
||||
@ -225,13 +225,20 @@ if (!("TD" in window)) {
|
||||
* @typedef ChirpRenderSettings
|
||||
* @type {Object}
|
||||
*
|
||||
* @property {boolean} withFooter
|
||||
* @property {boolean} withTweetActions
|
||||
* @property {boolean} isInConvo
|
||||
* @property {boolean} isFavorite
|
||||
* @property {boolean} isRetweeted
|
||||
* @property {boolean} isPossiblySensitive
|
||||
* @property {string} mediaPreviewSize
|
||||
* @property {boolean} [isFavorite}
|
||||
* @property {boolean} [isInConvo}
|
||||
* @property {boolean} [isMediaPreviewCompact}
|
||||
* @property {boolean} [isMediaPreviewInQuoted}
|
||||
* @property {boolean} [isMediaPreviewLarge}
|
||||
* @property {boolean} [isMediaPreviewOff}
|
||||
* @property {boolean} [isMediaPreviewSmall}
|
||||
* @property {boolean} [isPossiblySensitive}
|
||||
* @property {boolean} [isRetweeted}
|
||||
* @property {string} [mediaPreviewSize}
|
||||
* @property {string} [thumbSizeClass}
|
||||
* @property {boolean} [withFooter}
|
||||
* @property {boolean} [withMediaPreview}
|
||||
* @property {boolean} [withTweetActions}
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -273,6 +280,7 @@ if (!("TD" in window)) {
|
||||
|
||||
/**
|
||||
* @typedef TwitterConversation
|
||||
* @extends ChirpBase
|
||||
* @type {Object}
|
||||
*
|
||||
* @property {function} markAsRead
|
||||
|
@ -34,4 +34,4 @@
|
||||
|
||||
onNextFrame();
|
||||
});
|
||||
})(/** @type TD_Screenshot_Bridge */ $TD_NotificationScreenshot);
|
||||
})(/** @type {TD_Screenshot_Bridge} */ $TD_NotificationScreenshot);
|
||||
|
@ -49,7 +49,7 @@ export function loadConfigurationFile(pluginObject, fileNameUser, fileNameDefaul
|
||||
const token = pluginObject.$token;
|
||||
|
||||
$TDP.checkFileExists(token, fileNameUser).then(exists => {
|
||||
/** @type string|null */
|
||||
/** @type {string|null} */
|
||||
const fileName = exists ? fileNameUser : fileNameDefault;
|
||||
|
||||
if (fileName === null) {
|
||||
|
@ -19,10 +19,16 @@ export default function() {
|
||||
ensurePropertyExists(TD, "controller", "columnManager", "_columnOrder");
|
||||
ensurePropertyExists(TD, "controller", "columnManager", "move");
|
||||
|
||||
$(document).on("uiSearchNoTemporaryColumn", function(e, /** @type SearchEventData */ data) {
|
||||
/**
|
||||
* @param e
|
||||
* @param {SearchEventData} data
|
||||
*/
|
||||
const onSearch = function(e, data) {
|
||||
if (data.query && data.searchScope !== "users" && !data.columnKey && !("tduckResetInput" in data)) {
|
||||
$(".js-app-search-input").val("");
|
||||
$(".js-perform-search").blur();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$(document).on("uiSearchNoTemporaryColumn", onSearch);
|
||||
};
|
||||
|
@ -23,7 +23,7 @@ import { ensurePropertyExists } from "../api/utils.js";
|
||||
export default function() {
|
||||
ensurePropertyExists($, "tools", "dateinput", "conf", "firstDay");
|
||||
|
||||
/** @type DateInput */
|
||||
/** @type {DateInput} */
|
||||
const dateinput = $["tools"]["dateinput"];
|
||||
|
||||
onAppReady(function setupDatePickerFirstDayCallback() {
|
||||
|
@ -16,7 +16,13 @@ export default function() {
|
||||
ensurePropertyExists(TD, "controller", "clients", "getClient");
|
||||
ensurePropertyExists(TD, "services", "Conversations", "prototype", "getConversation");
|
||||
|
||||
$(document).on("dataDmSent", function(e, /** @type DmSentEventData */ data) {
|
||||
/**
|
||||
* @param e
|
||||
* @param {DmSentEventData} data
|
||||
*/
|
||||
const onDataDmSent = function(e, data) {
|
||||
TD.controller.clients.getClient(data.request.accountKey)?.conversations.getConversation(data.request.conversationId)?.markAsRead();
|
||||
});
|
||||
};
|
||||
|
||||
$(document).on("dataDmSent", onDataDmSent);
|
||||
};
|
||||
|
@ -20,7 +20,11 @@ export default function() {
|
||||
ensurePropertyExists(TD, "controller", "columnManager", "_columnOrder");
|
||||
ensurePropertyExists(TD, "controller", "columnManager", "move");
|
||||
|
||||
$(document).on("uiSearchNoTemporaryColumn", function(e, /** @type SearchEventData */ data) {
|
||||
/**
|
||||
* @param e
|
||||
* @param {SearchEventData} data
|
||||
*/
|
||||
const onSearch = function(e, data) {
|
||||
if (data.query && data.searchScope !== "users" && !data.columnKey && $TDX.openSearchInFirstColumn) {
|
||||
const order = TD.controller.columnManager._columnOrder;
|
||||
|
||||
@ -32,5 +36,7 @@ export default function() {
|
||||
TD.controller.columnManager.move(columnKey, "left");
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$(document).on("uiSearchNoTemporaryColumn", onSearch);
|
||||
};
|
||||
|
@ -4,7 +4,11 @@ import { $ } from "../api/jquery.js";
|
||||
* Creates a `tduckOldComposerActive` event on the `document` object, which triggers when the composer is activated.
|
||||
*/
|
||||
export default function() {
|
||||
$(document).on("uiDrawerActive uiRwebComposerOptOut", function(e, /** @type {{ activeDrawer: string }} */ data) {
|
||||
/**
|
||||
* @param e
|
||||
* @param {{ activeDrawer: string }} data
|
||||
*/
|
||||
const onDrawerEvent = function(e, data) {
|
||||
if (e.type === "uiDrawerActive" && data.activeDrawer !== "compose") {
|
||||
return;
|
||||
}
|
||||
@ -12,5 +16,7 @@ export default function() {
|
||||
setTimeout(function() {
|
||||
$(document).trigger("tduckOldComposerActive");
|
||||
}, 0);
|
||||
});
|
||||
};
|
||||
|
||||
$(document).on("uiDrawerActive uiRwebComposerOptOut", onDrawerEvent);
|
||||
};
|
||||
|
@ -12,7 +12,7 @@ export default function() {
|
||||
|
||||
if (checkPropertyExists(TD, "services", "TwitterUser", "prototype")) {
|
||||
replaceFunction(TD.services.TwitterUser.prototype, "fromJSONObject", function(func, args) {
|
||||
/** @type TwitterUser */
|
||||
/** @type {TwitterUser} */
|
||||
const user = func.apply(this, args);
|
||||
|
||||
if (user.id === accountId) {
|
||||
|
Loading…
Reference in New Issue
Block a user