refactor: fix a few type inconsistencies (#5788)

This commit is contained in:
Joshua Chen 2021-10-27 17:53:08 +08:00 committed by GitHub
parent 075234851c
commit 72990726e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 28 additions and 20 deletions

View file

@ -51,9 +51,8 @@ function useWindowSize(): WindowSize {
setWindowSize(getWindowSize());
}
// @ts-expect-error: annoying TS setTimeout typing...
const timeout: number | undefined = DevSimulateSSR
? setTimeout(updateWindowSize, 1000)
const timeout = DevSimulateSSR
? window.setTimeout(updateWindowSize, 1000)
: undefined;
window.addEventListener('resize', updateWindowSize);

View file

@ -778,7 +778,7 @@ declare module '@theme/TagsListByLetter' {
}
declare module '@theme/TagsListInline' {
export type Tag = Readonly<{label: string; permalink}>;
export type Tag = Readonly<{label: string; permalink: string}>;
export interface Props {
readonly tags: readonly Tag[];
}