Skip to content

fieldMask

fieldMask(schema, paths, strict?): FieldMask

Defined in: fieldmask.ts:28

Create a google.protobuf.FieldMask message. In addition to being less verbose, this function will validate the field mask to ensure it is valid for the given message descriptor. An error will be thrown if the field mask is invalid for the message descriptor.

The FieldMask spec does not allow for wildcards and repeated or map fields must be the last part of the path. The final argument for this function is strict, which defaults to true. If strict is true, the function will only allow field masks that are valid according to the spec. However, the AIP Guidelines allow for wildcards in field masks. So, if you want to allow wildcards, you can set strict to false. This will allow for field masks with standalone wildcards or wildcards in repeated or map fields (i.e. '*', 'foo.*', 'foo.*.bar', etc.).

DescMessage

string[]

boolean = true

FieldMask