mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-30 06:50:36 +02:00
refactor(plugin-pwa): migrate package to TS (#5941)
This commit is contained in:
parent
425144afc7
commit
85fcd9eb0f
12 changed files with 147 additions and 32 deletions
34
packages/docusaurus-plugin-pwa/src/plugin-pwa.d.ts
vendored
Normal file
34
packages/docusaurus-plugin-pwa/src/plugin-pwa.d.ts
vendored
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue