chore: upgrade to TS 4.7, compile with NodeNext (#7586)

Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
Joshua Chen 2022-06-16 01:15:11 +08:00 committed by GitHub
parent b503523f66
commit b4d93b9bd0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
62 changed files with 225 additions and 195 deletions

View file

@ -0,0 +1,15 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// TODO incompatible declaration file: https://github.com/unjs/webpackbar/pull/108
declare module 'webpackbar' {
import webpack from 'webpack';
export default class WebpackBarPlugin extends webpack.ProgressPlugin {
constructor(options: {name: string; color?: string});
}
}

View file

@ -139,7 +139,7 @@ async function registerSW() {
if (!offlineMode) {
return sendSkipWaiting();
}
return import('./renderReloadPopup').then(({default: renderReloadPopup}) =>
return import('./renderReloadPopup.js').then(({renderReloadPopup}) =>
renderReloadPopup({
onReload() {
wb.addEventListener('controlling', () => {

View file

@ -20,7 +20,7 @@ const createContainer = () => {
return container;
};
export default function renderReloadPopup(props: Props): Promise<void> {
export function renderReloadPopup(props: Props): Promise<void> {
const container = getContainer() ?? createContainer();
return import('@theme/PwaReloadPopup').then(({default: ReloadPopup}) => {
ReactDOM.render(<ReloadPopup {...props} />, container);