Skip to content
New issue

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

Fix typos in ts files as per Fossies source code check #5136

Merged
merged 16 commits into from
Apr 2, 2021
2 changes: 1 addition & 1 deletion stylesheets/_modules.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
// Module: Message

// Note: this does the same thing as module-timeline__message-container but
// can be used outside tht Timeline contact more easily.
// can be used outside the Timeline contact more easily.
.module-message-container {
@include button-reset;

Expand Down
2 changes: 1 addition & 1 deletion ts/linkPreviews/linkPreviewFetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ async function fetchWithRedirects(
}
urlsSeen.add(nextHrefToLoad);

// This `await` is deliberatly inside of a loop.
// This `await` is deliberately inside of a loop.
// eslint-disable-next-line no-await-in-loop
const response = await fetchFn(nextHrefToLoad, {
...options,
Expand Down
8 changes: 4 additions & 4 deletions ts/models/conversations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3091,7 +3091,7 @@ export class ConversationModel extends window.Backbone.Model<
}

// We are only creating this model so we can use its sync message
// sending functionality. It will not be saved to the datbase.
// sending functionality. It will not be saved to the database.
const message = new window.Whisper.Message(attributes);

// We're offline!
Expand Down Expand Up @@ -3201,7 +3201,7 @@ export class ConversationModel extends window.Backbone.Model<
}

// We are only creating this model so we can use its sync message
// sending functionality. It will not be saved to the datbase.
// sending functionality. It will not be saved to the database.
const message = new window.Whisper.Message(attributes);

// This is to ensure that the functions in send() and sendSyncMessage() don't save
Expand Down Expand Up @@ -5312,11 +5312,11 @@ window.Whisper.GroupMemberConversation = window.Backbone.Model.extend({

if (!conversation) {
throw new Error(
'GroupMemberConversation.initialze: conversation required!'
'GroupMemberConversation.initialize: conversation required!'
);
}
if (!window._.isBoolean(isAdmin)) {
throw new Error('GroupMemberConversation.initialze: isAdmin required!');
throw new Error('GroupMemberConversation.initialize: isAdmin required!');
}

// If our underlying conversation changes, we change too
Expand Down
4 changes: 2 additions & 2 deletions ts/models/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2239,7 +2239,7 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
return false;
}

// We can reply if this is outgoing and delievered to at least one recipient
// We can reply if this is outgoing and delivered to at least one recipient
if (isOutgoing && numDelivered > 0) {
return true;
}
Expand Down Expand Up @@ -3279,7 +3279,7 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
window.textsecure.protobuf.GroupContext.Type.DELIVER;

// Drop an incoming GroupV2 message if we or the sender are not part of the group
// after applying the message's associated group chnages.
// after applying the message's associated group changes.
if (
type === 'incoming' &&
!conversation.isPrivate() &&
Expand Down
2 changes: 1 addition & 1 deletion ts/sql/Queueing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let singleQueue: Queue | null = null;
let multipleQueue: Queue | null = null;

// Note: we don't want queue timeouts, because delays here are due to in-progress sql
// operations. For example we might try to start a transaction when the prevous isn't
// operations. For example we might try to start a transaction when the previous isn't
// done, causing that database operation to fail.
function makeNewSingleQueue(): Queue {
singleQueue = new Queue({ concurrency: 1 });
Expand Down
2 changes: 1 addition & 1 deletion ts/test-electron/linkPreviews/linkPreviewFetch_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ describe('link preview fetching', () => {
);
});

it('allows an explitly inline Content-Disposition header', async () => {
it('allows an explicitly inline Content-Disposition header', async () => {
const fakeFetch = stub().resolves(
makeResponse({
headers: { 'Content-Disposition': 'inline' },
Expand Down
2 changes: 1 addition & 1 deletion ts/textsecure/MessageReceiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@ class MessageReceiverInner extends EventTarget {

const errorString = error && error.stack ? error.stack : error;
window.log.error(
`maybeLightSessionReset/${id}: Enountered error`,
`maybeLightSessionReset/${id}: Encountered error`,
errorString
);
}
Expand Down
2 changes: 1 addition & 1 deletion ts/textsecure/Storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import utils from './Helpers';

// Default implmentation working with localStorage
// Default implementation working with localStorage
const localStorageImpl: StorageInterface = {
put(key: string, value: any) {
if (value === undefined) {
Expand Down
2 changes: 1 addition & 1 deletion ts/textsecure/SyncRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class SyncRequestInner extends EventTarget {
window.log.info('SyncRequest now sending contact sync message...');
wrap(sender.sendRequestContactSyncMessage(sendOptions))
.then(() => {
window.log.info('SyncRequest now sending group sync messsage...');
window.log.info('SyncRequest now sending group sync message...');
return wrap(sender.sendRequestGroupSyncMessage(sendOptions));
})
.catch((error: Error) => {
Expand Down
2 changes: 1 addition & 1 deletion ts/util/getAnimatedPngDataIfExists.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type AnimatedPngData = {
* 2. If so, does it contain the [`acTL` chunk][1] before the [`IDAT` chunk][2], in the
* first megabyte?
*
* Though we _could_ only check for the precense of the `acTL` chunk anywhere, we make
* Though we _could_ only check for the presence of the `acTL` chunk anywhere, we make
* sure it's before the `IDAT` chunk and within the first megabyte. This adds a small
* amount of validity checking and helps us avoid problems with large PNGs.
*
Expand Down
2 changes: 1 addition & 1 deletion ts/util/windowsZoneIdentifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const ZONE_IDENTIFIER_CONTENTS = Buffer.from('[ZoneTransfer]\r\nZoneId=3');
*
* To do this, we write the "Zone.Identifier" for the NTFS alternative data stream.
*
* This can fail in a bunch of sitations:
* This can fail in a bunch of situations:
*
* - The OS is not Windows.
* - The filesystem is not NTFS.
Expand Down
2 changes: 1 addition & 1 deletion ts/window.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ export type WhisperType = {
};

DeliveryReceipts: {
add: (reciept: WhatIsThis) => void;
add: (receipt: WhatIsThis) => void;
forMessage: (conversation: unknown, message: unknown) => Array<WhatIsThis>;
onReceipt: (receipt: WhatIsThis) => void;
};
Expand Down