Skip to content

Commit 31e775f

Browse files
committed
[core] expose scramjetclient in typedefs
1 parent fac8cef commit 31e775f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

lib/index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ import * as controller from "../dist/types/controller/index.ts";
44
import * as worker from "../dist/types/worker/index.ts";
55
import * as types from "../dist/types/types.ts";
66
import * as frame from "../dist/types/controller/frame.ts";
7+
import { ScramjetClient as _ScramjetClient } from "../dist/types/client/client.ts";
78

89
declare global {
910
function $scramjetLoadController(): typeof controller;
1011
function $scramjetLoadWorker(): typeof worker;
1112
function $scramjetLoadClient(config: ScramjetConfig);
1213
type ScramjetController = controller.ScramjetController;
1314
type ScramjetFrame = frame.ScramjetFrame;
15+
type ScramjetClient = _ScramjetClient;
1416

1517
type ScramjetConfig = types.ScramjetConfig;
1618
type ScramjetInitConfig = types.ScramjetInitConfig;

src/client/events.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,21 @@ export type ScramjetEvents = {
1111
};
1212

1313
export class NavigateEvent extends Event {
14+
type = "navigate";
1415
constructor(public url: string) {
1516
super("navigate");
1617
}
1718
}
1819

1920
export class UrlChangeEvent extends Event {
21+
type = "urlchange";
2022
constructor(public url: string) {
2123
super("urlchange");
2224
}
2325
}
2426

2527
export class ScramjetContextEvent extends Event {
28+
type = "contextInit";
2629
constructor(
2730
public window: Self,
2831
public client: ScramjetClient

0 commit comments

Comments
 (0)