Skip to content

Commit

Permalink
fix: update types
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdbradley committed Oct 3, 2022
1 parent d3fde7a commit f0041fb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/integration/api.md
Expand Up @@ -35,7 +35,8 @@ export interface PartytownConfig {
logStackTraces?: boolean;
// (undocumented)
mainWindowAccessors?: string[];
resolveUrl?(url: URL, location: Location): URL | undefined | null;
// Warning: (ae-forgotten-export) The symbol "ResolveUrlType" needs to be exported by the entry point index.d.ts
resolveUrl?(url: URL, location: Location, type: ResolveUrlType): URL | undefined | null;
// (undocumented)
set?: SetHook;
swPath?: string;
Expand Down
1 change: 1 addition & 0 deletions src/integration/index.ts
Expand Up @@ -19,4 +19,5 @@ export type {
ApplyHook,
GetHook,
SetHook,
ResolveUrlType,
} from '../lib/types';
7 changes: 5 additions & 2 deletions src/lib/types.ts
Expand Up @@ -371,6 +371,9 @@ export type SerializedInstance =
type: string
];

/**
* @public
*/
export type ResolveUrlType = 'fetch' | 'xhr' | 'script' | 'iframe';

/**
Expand Down Expand Up @@ -428,11 +431,11 @@ export interface PartytownConfig {
/**
* This array can be used to filter which script are executed via
* Partytown and which you would like to execute on the main thread.
*
*
* @example loadScriptsOnMainThread:['https://test.com/analytics.js', 'inline-script-id']
* // Loads the `https://test.com/analytics.js` script on the main thread
*/
loadScriptsOnMainThread?: string[]
loadScriptsOnMainThread?: string[];
get?: GetHook;
set?: SetHook;
apply?: ApplyHook;
Expand Down

1 comment on commit f0041fb

@vercel
Copy link

@vercel vercel bot commented on f0041fb Oct 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.