mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-02 19:03:38 +02:00
chore: upgrade TypeScript & other ESLint related deps (#5963)
* chore: upgrade ESLint related deps * Upgrade TS * Fix lock * Bump Babel * Update config
This commit is contained in:
parent
2f7d6fea1e
commit
0374426ce3
104 changed files with 2662 additions and 2487 deletions
|
@ -259,7 +259,7 @@ export function removePrefix(str: string, prefix: string): string {
|
|||
return str.startsWith(prefix) ? str.slice(prefix.length) : str;
|
||||
}
|
||||
|
||||
export function getElementsAround<T extends unknown>(
|
||||
export function getElementsAround<T>(
|
||||
array: T[],
|
||||
aroundIndex: number,
|
||||
): {
|
||||
|
@ -306,7 +306,7 @@ export function getPluginI18nPath({
|
|||
);
|
||||
}
|
||||
|
||||
export async function mapAsyncSequencial<T extends unknown, R extends unknown>(
|
||||
export async function mapAsyncSequencial<T, R>(
|
||||
array: T[],
|
||||
action: (t: T) => Promise<R>,
|
||||
): Promise<R[]> {
|
||||
|
@ -389,9 +389,7 @@ export function reportMessage(
|
|||
export function mergeTranslations(
|
||||
contents: TranslationFileContent[],
|
||||
): TranslationFileContent {
|
||||
return contents.reduce((acc, content) => {
|
||||
return {...acc, ...content};
|
||||
}, {});
|
||||
return contents.reduce((acc, content) => ({...acc, ...content}), {});
|
||||
}
|
||||
|
||||
export function getSwizzledComponent(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue