diff options
author | 2023-05-25 13:54:59 +0530 | |
---|---|---|
committer | 2023-05-25 16:24:59 +0800 | |
commit | 59d8c50b8426cd6825abc07405041779b7999022 (patch) | |
tree | 58f1da04fb268ad018b9f4ee0441ba8521ef0d06 | |
parent | dc31b8a722136eff90a600380a6419a37808d614 (diff) | |
download | astro-59d8c50b8426cd6825abc07405041779b7999022.tar.gz astro-59d8c50b8426cd6825abc07405041779b7999022.tar.zst astro-59d8c50b8426cd6825abc07405041779b7999022.zip |
fix: :adhesive_bandage: update partytown options ts type (#7175)
-rw-r--r-- | .changeset/curvy-hotels-study.md | 5 | ||||
-rw-r--r-- | packages/integrations/partytown/src/index.ts | 10 |
2 files changed, 9 insertions, 6 deletions
diff --git a/.changeset/curvy-hotels-study.md b/.changeset/curvy-hotels-study.md new file mode 100644 index 000000000..7ac2e8033 --- /dev/null +++ b/.changeset/curvy-hotels-study.md @@ -0,0 +1,5 @@ +--- +'@astrojs/partytown': patch +--- + +fix typescript type for partytown options diff --git a/packages/integrations/partytown/src/index.ts b/packages/integrations/partytown/src/index.ts index 95841a06c..97badee1b 100644 --- a/packages/integrations/partytown/src/index.ts +++ b/packages/integrations/partytown/src/index.ts @@ -9,17 +9,15 @@ import { fileURLToPath } from 'url'; import sirv from './sirv.js'; const resolve = createRequire(import.meta.url).resolve; -type PartytownOptions = - | { - config?: PartytownConfig; - } - | undefined; +type PartytownOptions = { + config?: PartytownConfig; +}; function appendForwardSlash(str: string) { return str.endsWith('/') ? str : str + '/'; } -export default function createPlugin(options: PartytownOptions): AstroIntegration { +export default function createPlugin(options?: PartytownOptions): AstroIntegration { let config: AstroConfig; let partytownSnippetHtml: string; const partytownEntrypoint = resolve('@builder.io/partytown/package.json'); |