aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/types
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-07-24 11:55:08 +0200
committerChocobozzz <me@florianbigard.com>2019-07-24 11:55:08 +0200
commitbfa1a32b34e14975e8f9ad43b5c9799fe5ced38a (patch)
treef3d0d939cbcfa00be98884a0145740a4e928593f /client/src/types
parent9ae88819c202a6ce4a36b56506f508a5603e8eab (diff)
downloadPeerTube-bfa1a32b34e14975e8f9ad43b5c9799fe5ced38a.tar.gz
PeerTube-bfa1a32b34e14975e8f9ad43b5c9799fe5ced38a.tar.zst
PeerTube-bfa1a32b34e14975e8f9ad43b5c9799fe5ced38a.zip
Add client hook/register typings
Diffstat (limited to 'client/src/types')
-rw-r--r--client/src/types/client-script.model.ts7
-rw-r--r--client/src/types/register-client-option.model.ts9
2 files changed, 16 insertions, 0 deletions
diff --git a/client/src/types/client-script.model.ts b/client/src/types/client-script.model.ts
new file mode 100644
index 000000000..6197fcac9
--- /dev/null
+++ b/client/src/types/client-script.model.ts
@@ -0,0 +1,7 @@
1import { RegisterClientOptions } from './register-client-option.model'
2
3export interface ClientScript {
4 register: (options: RegisterClientOptions) => Promise<any>
5
6 unregister: () => Promise<any>
7}
diff --git a/client/src/types/register-client-option.model.ts b/client/src/types/register-client-option.model.ts
new file mode 100644
index 000000000..42d689403
--- /dev/null
+++ b/client/src/types/register-client-option.model.ts
@@ -0,0 +1,9 @@
1import { RegisterClientHookOptions } from '@shared/models/plugins/register-client-hook.model'
2
3export type RegisterClientOptions = {
4 registerHook: (options: RegisterClientHookOptions) => void
5
6 peertubeHelpers: {
7 getBaseStaticRoute: () => string
8 }
9}