From 2ee27756802eacea4126181dc592a89d0c79f6f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Kr=C3=BCger?= Date: Mon, 13 Dec 2021 20:11:11 +0100 Subject: [PATCH] Some docs --- src/attenuation.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/attenuation.ts b/src/attenuation.ts index fa4db83..828dfcd 100644 --- a/src/attenuation.ts +++ b/src/attenuation.ts @@ -5,6 +5,14 @@ import * as util from "./util" export interface CapabilitySemantics { + /** + * Try to parse a capability into a representation used for + * delegation & returning in the `capabilities` call. + * + * If the capability doesn't seem to match the format expected + * for the capabilities with the semantics currently defined, + * return `null`. + */ tryParsing(cap: Capability): A | null /** * This figures out whether a given `childCap` can be delegated from `parentCap`.