refactor(plugin-pwa): migrate package to TS (#5941)

This commit is contained in:
Armano 2021-11-16 20:38:14 +01:00 committed by GitHub
parent 425144afc7
commit 85fcd9eb0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 147 additions and 32 deletions

View file

@ -0,0 +1,34 @@
/**
* 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.
*/
declare module '@docusaurus/plugin-pwa' {
export type pwaHead = {
tagName: string;
href?: string;
content?: string;
[attributeName: string]: string | boolean;
};
export type PluginOptions = {
debug?: boolean;
offlineModeActivationStrategies;
injectManifestConfig;
reloadPopup;
pwaHead: pwaHead[];
swCustom;
swRegister;
};
}
declare module '@theme/PwaReloadPopup' {
export type PwaReloadPopupProps = {
readonly onReload: () => void;
};
const PwaReloadPopup: (props: PwaReloadPopupProps) => JSX.Element;
export default PwaReloadPopup;
}