endo
endo copied to clipboard
fix(compartment-mapper): fix ReadPowers-related types
Description
This change:
- Creates a minimal interface for the
fs,url, andcryptoobjects as passed intomakeReadPowers(). This makes it easier to duck-type the objects. The drawback here is that it is not future-proof, and these types will need to be updated if we end up using additional methods on these objects. - Fixes the invalid type of
MaybeReadPowers; properties (defined thru@property) are ignored in a@typedefof that@typedefdoes not extendobject/Object. - Added necessary type assertion in
powers.js - Adds return type to
makeReadPowersSloppy()
Upgrade Considerations
This is a type-only change.
This stack of pull requests is managed by Graphite. Learn more about stacking.
Join @boneskull and the rest of your teammates on
Graphite