Function supportedPoliciesForAbility supportedPoliciesForAbility < const Policies extends readonly { vincentPolicy : { packageName : any ; abilityParamsSchema : any ; userParamsSchema ?: any ; precheckAllowResultSchema ?: any ; precheckDenyResultSchema ?: any ; evalAllowResultSchema ?: any ; evalDenyResultSchema ?: any ; commitParamsSchema ?: any ; commitAllowResultSchema ?: any ; commitDenyResultSchema ?: any ; evaluate : any ; precheck ?: any ; commit ?: any ; } ; ipfsCid : IpfsCid ; vincentAbilityApiVersion : VincentAbilityApiVersion ; } [] , const IpfsCid extends string = string , const VincentAbilityApiVersion extends string = string , const PkgNames extends any = Policies [ number ] [ "vincentPolicy" ] [ "packageName" ] , > ( policies : Policies , ) : AbilityPolicyMap < Policies , PkgNames > Type Parameters const Policies extends readonly { vincentPolicy : { packageName : any ; abilityParamsSchema : any ; userParamsSchema ?: any ; precheckAllowResultSchema ?: any ; precheckDenyResultSchema ?: any ; evalAllowResultSchema ?: any ; evalDenyResultSchema ?: any ; commitParamsSchema ?: any ; commitAllowResultSchema ?: any ; commitDenyResultSchema ?: any ; evaluate : any ; precheck ?: any ; commit ?: any ; } ; ipfsCid : IpfsCid ; vincentAbilityApiVersion : VincentAbilityApiVersion ; } [] const IpfsCid extends string = string const VincentAbilityApiVersion extends string = string const PkgNames extends any = Policies [ number ] [ "vincentPolicy" ] [ "packageName" ]
supportedPoliciesForAbility()
takes an array of bundled Vincent Policies, and provides strong type inference for those policies inside of your VincentAbility's lifecycle functions and return values.