abstractAResource <T>
Hierarchy
- ANode<IResource, T>
- AResource
Index
Properties
Methods
Properties
abstractreadonlyNODE_NAME
readonlyNODE_TYPE
readonlyproperties
Type declaration
[key string]: unknown
readonlyresourceId
readonlyresponse
Type declaration
[key string]: unknown
Methods
addChild
Parameters
onField: string | keyof T
child: UnknownNode
toField: string
Returns { childToParentDependency: Dependency; parentToChildDependency: Dependency }
childToParentDependency: Dependency
parentToChildDependency: Dependency
addRelationship
Returns { thatToThisDependency: Dependency; thisToThatDependency: Dependency }
thatToThisDependency: Dependency
thisToThatDependency: Dependency
diff
Parameters
previous: T | ASharedResource<T>
Returns Promise<Diff[]>
diffInverse
Parameters
diff: Diff
deReferenceResource: (resourceId: string) => Promise<UnknownResource>
Returns Promise<void>
diffProperties
Parameters
previous: T | ASharedResource<T>
Returns Promise<Diff[]>
getAncestors
Returns UnknownNode[]
getBoundaryMembers
Returns UnknownNode[]
getChild
Parameters
name: string
filters: { key: string; value: any }[] = []
Returns undefined | UnknownNode
getChildren
Parameters
optionalname: string
Returns {}
[key string]: Dependency[]
getContext
Returns string
getDependencies
Parameters
optionalto: UnknownNode
Returns Dependency[]
getDependency
Parameters
to: UnknownNode
relationship: DependencyRelationship
Returns undefined | Dependency
getDependencyIndex
Parameters
to: UnknownNode
relationship: DependencyRelationship
Returns number
getParents
Parameters
optionalname: string
Returns {}
[key string]: Dependency[]
getSharedResource
Returns undefined | ASharedResource<T>
getSiblings
Parameters
optionalname: string
Returns {}
[key string]: Dependency[]
hasAncestor
Parameters
node: UnknownNode
Returns boolean
isMarkedDeleted
Returns boolean
remove
To mark self as deleted. A deleted node will be removed from the graph after the transaction.
- A node cannot be deleted if it has dependencies.
Returns void
removeDependency
Parameters
dependencyIndex: number
Returns void
removeRelationship
Parameters
node: UnknownNode
Returns void
setContext
Returns string
synth
Returns IResource
staticunSynth
Parameters
deserializationClass: any
resource: IResource
parentResourceIds: string[]
deReferenceResource: (resourceId: string) => Promise<UnknownResource>
Returns Promise<UnknownResource>
To check if self is marked as deleted. A deleted node will be removed from the graph after the transaction.