Upgrade web app and pacakges to TypeScript 5.3.3 (#26354)

Этот коммит содержится в:
Harrison Healey
2024-03-04 16:07:39 -05:00
коммит произвёл GitHub
родитель d5446cd25e
Коммит 5740b43922
11 изменённых файлов: 325 добавлений и 420 удалений

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

@@ -98,7 +98,7 @@
"timezones.json": "1.6.1",
"tinycolor2": "1.4.2",
"turndown": "7.1.1",
"typescript": "4.9.5",
"typescript": "5.3.3",
"zen-observable": "0.9.0"
},
"devDependencies": {
@@ -184,6 +184,11 @@
"webpack-pwa-manifest": "4.3.0",
"yargs": "16.2.0"
},
"overrides": {
"@mattermost/desktop-api": {
"typescript": "$typescript"
}
},
"scripts": {
"check": "eslint --ext .js,.jsx,.tsx,.ts ./src --quiet --cache && stylelint \"**/*.{css,scss}\" --cache",
"fix": "eslint --ext .js,.jsx,.tsx,.ts ./src --quiet --fix --cache && stylelint \"**/*.{css,scss}\" --fix --cache",

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

@@ -495,7 +495,7 @@ class ChannelHeader extends React.PureComponent<Props, State> {
placement='bottom'
rootClose={true}
target={this.headerDescriptionRef.current as React.ReactInstance}
ref={this.headerOverlayRef}
ref={this.headerOverlayRef as any}
onHide={() => this.setState({showChannelHeaderPopover: false})}
>
{popoverContent}

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

@@ -151,6 +151,7 @@ describe('components/SwitchChannelProvider', () => {
type: 'O',
name: 'other_user',
display_name: 'other_user',
update_at: 0,
delete_at: 0,
},
{
@@ -158,6 +159,7 @@ describe('components/SwitchChannelProvider', () => {
type: 'D',
name: 'current_user_id__other_user',
display_name: 'other_user',
update_at: 0,
delete_at: 0,
}];
const searchText = 'other';
@@ -194,6 +196,7 @@ describe('components/SwitchChannelProvider', () => {
type: 'O',
name: 'other_user',
display_name: 'other_user',
update_at: 0,
delete_at: 0,
}];
const searchText = 'other';
@@ -226,6 +229,7 @@ describe('components/SwitchChannelProvider', () => {
type: 'O',
name: 'other_user',
display_name: 'other_user',
update_at: 0,
delete_at: 0,
},
{
@@ -233,6 +237,7 @@ describe('components/SwitchChannelProvider', () => {
type: 'D',
name: 'current_user_id__other_user',
display_name: 'other_user',
update_at: 0,
delete_at: 0,
}];
const searchText = 'something else';
@@ -833,6 +838,7 @@ describe('components/SwitchChannelProvider', () => {
type: 'G',
name: 'other_gm_channel',
delete_at: 0,
update_at: 0,
display_name: 'other_user1, current_user_id',
}];

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

@@ -74,10 +74,11 @@ const ThreadsChannel: FakeChannel = {
name: 'threads',
display_name: 'Threads',
type: Constants.THREADS,
update_at: 0,
delete_at: 0,
};
type FakeChannel = Pick<Channel, 'id' | 'name' | 'display_name' | 'delete_at'> & {
type FakeChannel = Pick<Channel, 'id' | 'name' | 'display_name' | 'update_at' | 'delete_at'> & {
type: string;
}

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

@@ -14,7 +14,7 @@ export function getFormattedFileSize(file: FileInfo): string {
['GB', 1024 * 1024 * 1024],
['MB', 1024 * 1024],
['KB', 1024],
];
] as const;
const size = fileSizes.find((unitAndMinBytes) => {
const minBytes = unitAndMinBytes[1];
return bytes > minBytes;

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

@@ -11,6 +11,7 @@ import type {OverlayTriggerProps} from 'react-bootstrap';
export interface AdditionalOverlayTriggerProps extends React.ComponentPropsWithRef<typeof OverlayTriggerProps> {
className?: string;
overlay: any;
}
declare class OverlayTrigger extends React.Component<AdditionalOverlayTriggerProps> {}