You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
We currently can only validate JSON entries against a given schema, but we cannot perform any integrity checks.
We currently cannot perform any validity/type checking on a code contribution c when registering it using registerCodeContribution<T>(c). We must rely on the user that c is valid and of type T.
Describe the solution you'd like
Allow for optional validators isEntryValid and isContributionValid to ManifestContributionInfo and CodeContributionInfo when defining a new ContributionPoint:
exportinterfaceManifestContributionInfo<TM=unknown,TS=TM>{schema: JsonTypedSchema<TM>|JsonSchema;processEntry?: (entry: TM)=>TS;isEntryValid(entry: unknown)?: entry is TM;/* NEW */}exportinterfaceCodeContributionInfo<TS=unknown>{idKey?: KeyOfObjOrArrayItem<TS>;activationEvent?: string;isContributionValid<TC=unknown>(contrib: unknown)?: contrib is TC;/* NEW */}
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
c
when registering it usingregisterCodeContribution<T>(c)
. We must rely on the user thatc
is valid and of typeT
.Describe the solution you'd like
Allow for optional validators
isEntryValid
andisContributionValid
toManifestContributionInfo
andCodeContributionInfo
when defining a newContributionPoint
:The text was updated successfully, but these errors were encountered: