Skip to content

Commit f1ea8c9

Browse files
committed
Shared workers: Allow filename URLs
1 parent 59756ac commit f1ea8c9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugin.d.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import {URL} from 'url';
2+
13
export namespace SharedWorker {
24
export type ProtocolIdentifier = 'experimental';
35

@@ -46,7 +48,7 @@ export namespace SharedWorker {
4648

4749
export namespace Plugin {
4850
export type RegistrationOptions<Identifier extends ProtocolIdentifier, Data = unknown> = {
49-
readonly filename: string;
51+
readonly filename: string | URL;
5052
readonly initialData?: Data;
5153
readonly supportedProtocols: readonly Identifier[];
5254
readonly teardown?: () => void;

0 commit comments

Comments
 (0)