Add some types for the policy and export them from compartment-mapper.
Remove some "alias"-style typedefs
Change assertPackagePolicy to be a type guard.
Security Considerations
none
Scaling Considerations
none
Documentation Considerations
This could cause compiler errors in consumers already using policies (if those consumers exist), since the types have been narrowed.
Testing Considerations
This adds tests using tsd, which requires adding that dev dependency to compartment-mapper and modifying its test script.
Upgrade Considerations
This should not impact live production systems; it may impact builds. Because it may impact builds, this could be construed as a breaking change, depending on Endo's policy or lack thereof.
This is currently a DRAFT and should be considered in-progress.
closes: #1776
Description
compartment-mapper
.assertPackagePolicy
to be a type guard.Security Considerations
none
Scaling Considerations
none
Documentation Considerations
This could cause compiler errors in consumers already using policies (if those consumers exist), since the types have been narrowed.
Testing Considerations
This adds tests using
tsd
, which requires adding that dev dependency tocompartment-mapper
and modifying itstest
script.Upgrade Considerations
This should not impact live production systems; it may impact builds. Because it may impact builds, this could be construed as a breaking change, depending on Endo's policy or lack thereof.
This is currently a DRAFT and should be considered in-progress.