aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core/plugins/plugin.service.ts
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/app/core/plugins/plugin.service.ts
parent9ae88819c202a6ce4a36b56506f508a5603e8eab (diff)
downloadPeerTube-bfa1a32b34e14975e8f9ad43b5c9799fe5ced38a.tar.gz
PeerTube-bfa1a32b34e14975e8f9ad43b5c9799fe5ced38a.tar.zst
PeerTube-bfa1a32b34e14975e8f9ad43b5c9799fe5ced38a.zip
Add client hook/register typings
Diffstat (limited to 'client/src/app/core/plugins/plugin.service.ts')
-rw-r--r--client/src/app/core/plugins/plugin.service.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/client/src/app/core/plugins/plugin.service.ts b/client/src/app/core/plugins/plugin.service.ts
index e4a73de81..1294edd7d 100644
--- a/client/src/app/core/plugins/plugin.service.ts
+++ b/client/src/app/core/plugins/plugin.service.ts
@@ -3,6 +3,7 @@ import { Router } from '@angular/router'
3import { ServerConfigPlugin } from '@shared/models' 3import { ServerConfigPlugin } from '@shared/models'
4import { ServerService } from '@app/core/server/server.service' 4import { ServerService } from '@app/core/server/server.service'
5import { ClientScript } from '@shared/models/plugins/plugin-package-json.model' 5import { ClientScript } from '@shared/models/plugins/plugin-package-json.model'
6import { ClientScript as ClientScriptModule } from '../../../types/client-script.model'
6import { environment } from '../../../environments/environment' 7import { environment } from '../../../environments/environment'
7import { ReplaySubject } from 'rxjs' 8import { ReplaySubject } from 'rxjs'
8import { first, shareReplay } from 'rxjs/operators' 9import { first, shareReplay } from 'rxjs/operators'
@@ -186,7 +187,7 @@ export class PluginService implements ClientHook {
186 console.log('Loading script %s of plugin %s.', clientScript.script, plugin.name) 187 console.log('Loading script %s of plugin %s.', clientScript.script, plugin.name)
187 188
188 return import(/* webpackIgnore: true */ clientScript.script) 189 return import(/* webpackIgnore: true */ clientScript.script)
189 .then(script => script.register({ registerHook, peertubeHelpers })) 190 .then((script: ClientScriptModule) => script.register({ registerHook, peertubeHelpers }))
190 .then(() => this.sortHooksByPriority()) 191 .then(() => this.sortHooksByPriority())
191 } 192 }
192 193