From c04c83c22a6ea769f04738a4b3ec82d9fb7205b6 Mon Sep 17 00:00:00 2001 From: MotorTruck1221 Date: Fri, 10 Jan 2025 01:34:13 -0700 Subject: [PATCH] Functionality is all done! --- src/utils/marketplace.ts | 13 ++++++++++++- src/utils/marketplaceUserTypes.ts | 10 ++++++++++ src/utils/settings.ts | 2 -- 3 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 src/utils/marketplaceUserTypes.ts diff --git a/src/utils/marketplace.ts b/src/utils/marketplace.ts index 993cba3..2bfb8bc 100644 --- a/src/utils/marketplace.ts +++ b/src/utils/marketplace.ts @@ -262,4 +262,15 @@ class Marketplace { } } -export { Marketplace } +export { + Marketplace, + type PluginType, + type MarketplacePluginType, + type PackageType, + type Plug, + type SWPagePlugin, + type SWPluginFunction, + type Events, + type SWPlugin, + type Theme +} diff --git a/src/utils/marketplaceUserTypes.ts b/src/utils/marketplaceUserTypes.ts new file mode 100644 index 0000000..67dd84b --- /dev/null +++ b/src/utils/marketplaceUserTypes.ts @@ -0,0 +1,10 @@ +import { type SWPluginFunction as PluginFunction, type SWPagePlugin, type SWPlugin } from "./marketplace"; + +interface PagePlugin extends Omit {} +interface ServiceWorkerPlugin extends Omit {} + +declare global { + function entryFunc(): PagePlugin | ServiceWorkerPlugin; +} + +export { type PagePlugin, type ServiceWorkerPlugin, type PluginFunction }; diff --git a/src/utils/settings.ts b/src/utils/settings.ts index ce7f323..e745e44 100644 --- a/src/utils/settings.ts +++ b/src/utils/settings.ts @@ -105,6 +105,4 @@ const Settings = { initDefaults } -window.settings = Settings; - export { Settings };