Closed matheus23 closed 2 years ago
Closing in favor of #79. This shouldn't be release on its own, so why make it a separate PR?
@dholms I really recommend checking out #79 instead. And I'm sorry that it's a 1.5k lines diff. I did some reworking :sweat_smile:
I tried to keep the diffs smaller by splitting the PRs up, but it's hard to meaningfully split them up. I wouldn't want this version of the chopped public API published, but I would want the other version of the public API published :+1:
kk makes sense. i'll take a look 👀
I'm re-working the public API. The main goal of this is to reduce & streamline the public API surface again. The first thing on the chopping block is the
Chained
type. It had a couple of problems:Chained.fromToken
,token.validate
and thecapabilities
function.Now that
Chained
is gone, some things suck a little more. Some functions becameasync
because they can't take the pre-processedChained
type again, but need to actually do the processing themselves, which is async. It's most awkward in thedelegateCapability
function in the builder, which is now async. But don't worry! I have a plan on how to get it sync again! (and remove the awkwardness).The whole API rework is probably going to be split into two PRs, this one and another one based on this. I'm hoping this will make it easier to review them independently.