Replace "bool" with type "boolean"

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2021-08-30 14:53:15 +02:00
Родитель 628d65ad74
Коммит f307272c53
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 7076EA9751AACDDA
9 изменённых файлов: 20 добавлений и 20 удалений

Просмотреть файл

@ -793,7 +793,7 @@ export default {
* @param {string} messageId message id * @param {string} messageId message id
* @param {boolean} smooth true to smooth scroll, false to jump directly * @param {boolean} smooth true to smooth scroll, false to jump directly
* @param {boolean} highlightAnimation true to highlight and set focus to the message * @param {boolean} highlightAnimation true to highlight and set focus to the message
* @return {bool} true if element was found, false otherwise * @return {boolean} true if element was found, false otherwise
*/ */
focusMessage(messageId, smooth = true, highlightAnimation = true) { focusMessage(messageId, smooth = true, highlightAnimation = true) {
const element = document.getElementById(`message_${messageId}`) const element = document.getElementById(`message_${messageId}`)

Просмотреть файл

@ -447,8 +447,8 @@ export default {
* Handles file upload * Handles file upload
* *
* @param {File[] | FileList} files pasted files list * @param {File[] | FileList} files pasted files list
* @param {bool} rename whether to rename the files * @param {boolean} rename whether to rename the files
* @param {bool} isVoiceMessage indicates whether the file is a vooicemessage * @param {boolean} isVoiceMessage indicates whether the file is a vooicemessage
*/ */
async handleFiles(files, rename = false, isVoiceMessage) { async handleFiles(files, rename = false, isVoiceMessage) {
// Create a unique id for the upload operation // Create a unique id for the upload operation

Просмотреть файл

@ -30,9 +30,9 @@ import Hex from 'crypto-js/enc-hex'
* specified with its token. * specified with its token.
* *
* @param {string} token the conversation token; * @param {string} token the conversation token;
* @param {object} options options;
* @param {string} lastKnownMessageId last known message id; * @param {string} lastKnownMessageId last known message id;
* @param {bool} includeLastKnown whether to include the last known message in the response; * @param {boolean} includeLastKnown whether to include the last known message in the response;
* @param {object} options options;
*/ */
const fetchMessages = async function({ token, lastKnownMessageId, includeLastKnown }, options) { const fetchMessages = async function({ token, lastKnownMessageId, includeLastKnown }, options) {
return axios.get(generateOcsUrl('apps/spreed/api/v1/chat/{token}', { token }), Object.assign(options, { return axios.get(generateOcsUrl('apps/spreed/api/v1/chat/{token}', { token }), Object.assign(options, {

Просмотреть файл

@ -35,7 +35,7 @@ import {
* *
* @param {string} token The conversation token; * @param {string} token The conversation token;
* @param {options} options request options; * @param {options} options request options;
* @param {bool} forceJoin whether to force join; * @param {boolean} forceJoin whether to force join;
*/ */
const joinConversation = async ({ token, forceJoin = false }, options) => { const joinConversation = async ({ token, forceJoin = false }, options) => {
const response = await axios.post(generateOcsUrl('apps/spreed/api/v4/room/{token}/participants/active', { token }), { const response = await axios.post(generateOcsUrl('apps/spreed/api/v4/room/{token}/participants/active', { token }), {

Просмотреть файл

@ -140,9 +140,9 @@ const actions = {
* If clearLast is false, also remembers it in separate properties. * If clearLast is false, also remembers it in separate properties.
* *
* @param {object} context default store context; * @param {object} context default store context;
* @param {bool} isGrid=null true for enabled grid mode, false for speaker view; * @param {boolean|null} isGrid true for enabled grid mode, false for speaker view;
* @param {bool} isStripeOpen=null true for visible stripel mode, false for speaker view; * @param {boolean|null} isStripeOpen true for visible stripel mode, false for speaker view;
* @param {bool} clearLast=true set to false to not reset last temporary remembered state; * @param {boolean} clearLast set to false to not reset last temporary remembered state;
*/ */
setCallViewMode(context, { isGrid = null, isStripeOpen = null, clearLast = true }) { setCallViewMode(context, { isGrid = null, isStripeOpen = null, clearLast = true }) {
if (clearLast) { if (clearLast) {

Просмотреть файл

@ -194,7 +194,7 @@ const actions = {
* @param {object} files the files to be processed * @param {object} files the files to be processed
* @param {string} token the conversation's token where to share the files * @param {string} token the conversation's token where to share the files
* @param {number} uploadId a unique id for the upload operation indexing * @param {number} uploadId a unique id for the upload operation indexing
* @param {bool} rename whether to rename the files (usually after pasting) * @param {boolean} rename whether to rename the files (usually after pasting)
*/ */
async initialiseUpload({ commit, dispatch }, { uploadId, token, files, rename = false, isVoiceMessage }) { async initialiseUpload({ commit, dispatch }, { uploadId, token, files, rename = false, isVoiceMessage }) {
// Set last upload id // Set last upload id

Просмотреть файл

@ -42,7 +42,7 @@ import {
* *
* @param {object} context store context * @param {object} context store context
* @param {object} message message object * @param {object} message message object
* @return {bool} true if the message contains a mention to self or all, * @return {boolean} true if the message contains a mention to self or all,
* false otherwise * false otherwise
*/ */
function hasMentionToSelf(context, message) { function hasMentionToSelf(context, message) {
@ -118,7 +118,7 @@ const getters = {
* *
* @param {object} state the state object. * @param {object} state the state object.
* @param {object} getters the getters object. * @param {object} getters the getters object.
* @return {bool} true if more messages exist that needs loading, false otherwise * @return {boolean} true if more messages exist that needs loading, false otherwise
*/ */
hasMoreMessagesToLoad: (state, getters) => (token) => { hasMoreMessagesToLoad: (state, getters) => (token) => {
const conversation = getters.conversation(token) const conversation = getters.conversation(token)
@ -547,7 +547,7 @@ const actions = {
* @param {object} context default store context; * @param {object} context default store context;
* @param token.token * @param token.token
* @param {object} token the token of the conversation to be updated; * @param {object} token the token of the conversation to be updated;
* @param {bool} updateVisually whether to also clear the marker visually in the UI; * @param {boolean} updateVisually whether to also clear the marker visually in the UI;
* @param token.updateVisually * @param token.updateVisually
*/ */
async clearLastReadMessage(context, { token, updateVisually = false }) { async clearLastReadMessage(context, { token, updateVisually = false }) {
@ -568,7 +568,7 @@ const actions = {
* @param token.token * @param token.token
* @param {object} token the token of the conversation to be updated; * @param {object} token the token of the conversation to be updated;
* @param {number} id the id of the message on which to set the read marker; * @param {number} id the id of the message on which to set the read marker;
* @param {bool} updateVisually whether to also update the marker visually in the UI; * @param {boolean} updateVisually whether to also update the marker visually in the UI;
* @param token.id * @param token.id
* @param token.updateVisually * @param token.updateVisually
*/ */
@ -602,7 +602,7 @@ const actions = {
* @param {string} token the conversation token; * @param {string} token the conversation token;
* @param {object} requestOptions request options; * @param {object} requestOptions request options;
* @param {string} lastKnownMessageId last known message id; * @param {string} lastKnownMessageId last known message id;
* @param {bool} includeLastKnown whether to include the last known message in the response; * @param {boolean} includeLastKnown whether to include the last known message in the response;
*/ */
async fetchMessages(context, { token, lastKnownMessageId, includeLastKnown, requestOptions }) { async fetchMessages(context, { token, lastKnownMessageId, includeLastKnown, requestOptions }) {
context.dispatch('cancelFetchMessages') context.dispatch('cancelFetchMessages')
@ -663,7 +663,7 @@ const actions = {
* Cancels a previously running "fetchMessages" action if applicable. * Cancels a previously running "fetchMessages" action if applicable.
* *
* @param {object} context default store context; * @param {object} context default store context;
* @return {bool} true if a request got cancelled, false otherwise * @return {boolean} true if a request got cancelled, false otherwise
*/ */
cancelFetchMessages(context) { cancelFetchMessages(context) {
if (context.state.cancelFetchMessages) { if (context.state.cancelFetchMessages) {
@ -772,7 +772,7 @@ const actions = {
* *
* @param {object} context default store context; * @param {object} context default store context;
* @param {string} requestId request id * @param {string} requestId request id
* @return {bool} true if a request got cancelled, false otherwise * @return {boolean} true if a request got cancelled, false otherwise
*/ */
cancelLookForNewMessages(context, { requestId }) { cancelLookForNewMessages(context, { requestId }) {
if (context.state.cancelLookForNewMessages[requestId]) { if (context.state.cancelLookForNewMessages[requestId]) {
@ -886,7 +886,7 @@ const actions = {
* *
* @param {object} context default store context; * @param {object} context default store context;
* @param {string} messageId the message id for which to cancel; * @param {string} messageId the message id for which to cancel;
* @return {bool} true if a request got cancelled, false otherwise * @return {boolean} true if a request got cancelled, false otherwise
*/ */
cancelPostNewMessage(context, { messageId }) { cancelPostNewMessage(context, { messageId }) {
if (context.state.cancelPostNewMessage[messageId]) { if (context.state.cancelPostNewMessage[messageId]) {

Просмотреть файл

@ -442,7 +442,7 @@ LocalMediaModel.prototype = {
/** /**
* Toggles hand raised mode for the local participant * Toggles hand raised mode for the local participant
* *
* @param {bool} raised true for raised, false for lowered * @param {boolean} raised true for raised, false for lowered
*/ */
toggleHandRaised(raised) { toggleHandRaised(raised) {
if (!this._webRtc) { if (!this._webRtc) {

Просмотреть файл

@ -136,7 +136,7 @@ const cloneLinkedStream = function(stream) {
* no media was available when started. An active local media will automatically * no media was available when started. An active local media will automatically
* react to changes in the selected media devices. * react to changes in the selected media devices.
* *
* @return {bool} true if the local media is active, false otherwise * @return {boolean} true if the local media is active, false otherwise
*/ */
LocalMedia.prototype.isLocalMediaActive = function() { LocalMedia.prototype.isLocalMediaActive = function() {
return this._localMediaActive return this._localMediaActive