API Reference
Modules

@perspect3vism/ad4m / Exports

@perspect3vism/ad4m

Table of contents

Enumerations

Classes

Interfaces

Type Aliases

Variables

Functions

Type Aliases

Ad4mSignalCB

Ƭ Ad4mSignalCB: (signal: any) => void

Type declaration

▸ (signal): void

Parameters
NameType
signalany
Returns

void

Defined in

language/LanguageContext.ts:37 (opens in a new tab)


Address

Ƭ Address: string

Defined in

Address.ts:1 (opens in a new tab)


DID

Ƭ DID: string

Defined in

DID.ts:1 (opens in a new tab)


LinkStatus

Ƭ LinkStatus: "shared" | "local"

Defined in

perspectives/PerspectiveProxy.ts:15 (opens in a new tab)


MessageCallback

Ƭ MessageCallback: (message: PerspectiveExpression) => void

Type declaration

▸ (message): void

Parameters
NameType
messagePerspectiveExpression
Returns

void

Defined in

language/Language.ts:192 (opens in a new tab)


PerspectiveDiffObserver

Ƭ PerspectiveDiffObserver: (diff: PerspectiveDiff) => void

Type declaration

▸ (diff): void

Parameters
NameType
diffPerspectiveDiff
Returns

void

Defined in

language/Language.ts:151 (opens in a new tab)


QueryPartialEntity

Ƭ QueryPartialEntity<T>: { [P in keyof T]?: T[P] | Function }

Type parameters

Name
T

Defined in

subject/SubjectEntity.ts:6 (opens in a new tab)


StatusCallback

Ƭ StatusCallback: (caller: DID) => Perspective

Type declaration

▸ (caller): Perspective

Parameters
NameType
callerDID
Returns

Perspective

Defined in

language/Language.ts:193 (opens in a new tab)


SubjectArray

Ƭ SubjectArray<T>: T[] | { action: "setter" | "adder" | "remover" ; value: T[] }

Type parameters

Name
T

Defined in

subject/SubjectEntity.ts:226 (opens in a new tab)


SyncStateChangeObserver

Ƭ SyncStateChangeObserver: (state: PerspectiveState) => void

Type declaration

▸ (state): void

Parameters
NameType
statePerspectiveState
Returns

void

Defined in

language/Language.ts:152 (opens in a new tab)


TelepresenceSignalCallback

Ƭ TelepresenceSignalCallback: (payload: PerspectiveExpression) => void

Type declaration

▸ (payload): void

Parameters
NameType
payloadPerspectiveExpression
Returns

void

Defined in

language/Language.ts:258 (opens in a new tab)

Variables

SMART_LITERAL_CONTENT_PREDICATE

Const SMART_LITERAL_CONTENT_PREDICATE: "smart_literal://content"

Defined in

SmartLiteral.ts:6 (opens in a new tab)


typeDefsString

Const typeDefsString: ""

Defined in

typeDefs.ts:6 (opens in a new tab)

Functions

ExpressionGeneric

ExpressionGeneric<DataType>(DataTypeClass): any

Type parameters

Name
DataType

Parameters

NameType
DataTypeClassClassType<DataType>

Returns

any

Defined in

expression/Expression.ts:42 (opens in a new tab)


ExpressionGenericInput

ExpressionGenericInput<DataType>(DataTypeClass): any

Type parameters

Name
DataType

Parameters

NameType
DataTypeClassClassType<DataType>

Returns

any

Defined in

expression/Expression.ts:67 (opens in a new tab)


SDNAClass

SDNAClass(opts): (target: any) => void

Parameters

NameType
optsSDNAClassOptions

Returns

fn

▸ (target): void

Parameters
NameType
targetany
Returns

void

Defined in

subject/SDNADecorators.ts:159 (opens in a new tab)


addLink

addLink(source, predicate, target): PerspectiveAction

Parameters

NameType
sourcestring
predicatestring
targetstring

Returns

PerspectiveAction

Defined in

subject/SDNADecorators.ts:12 (opens in a new tab)


capSentence

capSentence(cap): string

Parameters

NameType
capany

Returns

string

Defined in

utils.ts:15 (opens in a new tab)


exprRef2String

exprRef2String(ref): string

Parameters

NameType
refExpressionRef

Returns

string

Defined in

expression/ExpressionRef.ts:22 (opens in a new tab)


formatList

formatList(list): any

Parameters

NameType
listany

Returns

any

Defined in

utils.ts:1 (opens in a new tab)


hasLink

hasLink(predicate): string

Parameters

NameType
predicatestring

Returns

string

Defined in

subject/SDNADecorators.ts:21 (opens in a new tab)


instanceQuery

instanceQuery(options?): <T>(target: T, key: keyof T, descriptor: PropertyDescriptor) => void

Parameters

NameType
options?InstanceQueryParams

Returns

fn

▸ <T>(target, key, descriptor): void

Type parameters
Name
T
Parameters
NameType
targetT
keykeyof T
descriptorPropertyDescriptor
Returns

void

Defined in

subject/SDNADecorators.ts:30 (opens in a new tab)


isExpression

isExpression(e): boolean

Parameters

NameType
eany

Returns

boolean

Defined in

expression/Expression.ts:97 (opens in a new tab)


isLink

isLink(l): boolean

Parameters

NameType
lany

Returns

boolean

Defined in

links/Links.ts:91 (opens in a new tab)


linkEqual

linkEqual(l1, l2): boolean

Parameters

NameType
l1LinkExpression
l2LinkExpression

Returns

boolean

Defined in

links/Links.ts:83 (opens in a new tab)


makeRandomPrologAtom

makeRandomPrologAtom(length): string

Parameters

NameType
lengthnumber

Returns

string

Defined in

subject/SDNADecorators.ts:145 (opens in a new tab)


parseExprUrl

parseExprUrl(url): ExpressionRef

Parameters

NameType
urlstring

Returns

ExpressionRef

Defined in

expression/ExpressionRef.ts:29 (opens in a new tab)


subjectCollection

subjectCollection(opts): <T>(target: T, key: keyof T) => void

Parameters

NameType
optsCollectionOptions

Returns

fn

▸ <T>(target, key): void

Type parameters
Name
T
Parameters
NameType
targetT
keykeyof T
Returns

void

Defined in

subject/SDNADecorators.ts:131 (opens in a new tab)


subjectFlag

subjectFlag(opts): <T>(target: T, key: keyof T) => void

Parameters

NameType
optsFlagOptions

Returns

fn

▸ <T>(target, key): void

Type parameters
Name
T
Parameters
NameType
targetT
keykeyof T
Returns

void

Defined in

subject/SDNADecorators.ts:102 (opens in a new tab)


subjectProperty

subjectProperty(opts): <T>(target: T, key: keyof T) => void

Parameters

NameType
optsPropertyOptions

Returns

fn

▸ <T>(target, key): void

Type parameters
Name
T
Parameters
NameType
targetT
keykeyof T
Returns

void

Defined in

subject/SDNADecorators.ts:83 (opens in a new tab)