Skip to content

Commit

Permalink
fix: 🩹 update partytown options ts type (#7175)
Browse files Browse the repository at this point in the history
  • Loading branch information
AkashRajpurohit authored May 25, 2023
1 parent dc31b8a commit 59d8c50
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/curvy-hotels-study.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/partytown': patch
---

fix typescript type for partytown options
10 changes: 4 additions & 6 deletions packages/integrations/partytown/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 59d8c50

Please sign in to comment.