@proto-kit/protocol • Docs
Documentation / @proto-kit/protocol / Path
Class: Path
Helps manage path (key) identifiers for key-values in trees.
Constructors
new Path()
new Path():
Path
Returns
Methods
fromKey()
staticfromKey<KeyType>(path,keyType,key):Field
Encodes an existing path with the provided key into a single Field.
Type Parameters
• KeyType
Parameters
• path: Field
• keyType: FlexibleProvablePure<KeyType>
• key: KeyType
Returns
Field
Field representation of the leading path + the provided key.
Defined in
packages/protocol/src/model/Path.ts:48
fromProperty()
staticfromProperty(className,propertyKey,prefix):Field
Encodes a class name and its property name into a Field
Parameters
• className: string
• propertyKey: string
• prefix: string
Returns
Field
Field representation of class name + property name
Defined in
packages/protocol/src/model/Path.ts:28
toField()
statictoField(value):Field
Encodes a JS string as a Field
Parameters
• value: string
Returns
Field
Field representation of the provided value