Skip to content

Commit

Permalink
feat(platform): allow to specify a generic when registering a capabil…
Browse files Browse the repository at this point in the history
…ity to increase type safety

closes #60
  • Loading branch information
danielwiehl authored and Marcarrian committed Feb 3, 2021
1 parent bf6011a commit 4af9433
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export class ManifestService implements PreDestroy {
* @return A Promise that resolves to the identity of the registered capability,
* or that rejects if the registration failed.
*/
public registerCapability(capability: Capability): Promise<string> {
public registerCapability<T extends Capability>(capability: T): Promise<string> {
return this._messageClient.request$<string>(ManifestRegistryTopics.RegisterCapability, capability)
.pipe(
throwOnErrorStatus(),
Expand Down

0 comments on commit 4af9433

Please sign in to comment.