lookup#

Interfaces#

Lookup#

Defined in: editor/src/lookup/index.ts:56

The services a statement’s value is looked up in.

Methods#

reconcile()#

reconcile(system, kind, texts, signal?): Promise<readonly (Candidate | null)[]>

Defined in: editor/src/lookup/index.ts:90

The best candidate for each text, null where none is found: one request for all texts at MusicBrainz (with its match), one search per text elsewhere (match false).

Parameters#
system#

string

kind#

ValueKind

texts#

readonly string[]

signal?#

AbortSignal

Returns#

Promise<readonly (Candidate | null)[]>

Throws#

LookupError As search.

resolvable()#

resolvable(system): boolean

Defined in: editor/src/lookup/index.ts:60

Whether resolve asks system.

Parameters#
system#

string

Returns#

boolean

resolve()#

resolve(system, iri, signal?): Promise<Candidate | null>

Defined in: editor/src/lookup/index.ts:82

The thing an IRI names in system, with its cross-references; null without a request where the system is not resolvable or the IRI is none of its things, and null for a video oEmbed does not describe.

Parameters#
system#

string

iri#

string

signal?#

AbortSignal

Returns#

Promise<Candidate | null>

Throws#

LookupError As search.

searchable()#

searchable(system, kind): boolean

Defined in: editor/src/lookup/index.ts:58

Whether search asks system for things of kind.

Parameters#
system#

string

kind#

ValueKind

Returns#

boolean


LookupOptions#

Defined in: editor/src/lookup/index.ts:99

What createLookup is given: how it fetches, the server, and what it searches and labels with.

Properties#

catalogue?#

readonly optional catalogue?: Catalogue

Defined in: editor/src/lookup/index.ts:107

The catalogue that recognises IRIs; the default catalogue by default.

fetch?#

readonly optional fetch?: {(input, init?): Promise<Response>; (input, init?): Promise<Response>; }

Defined in: editor/src/lookup/index.ts:101

The fetch to send requests with; the global one by default.

Call Signature#

(input, init?): Promise<Response>

MDN Reference

Parameters#
input#

RequestInfo | URL

init?#

RequestInit

Returns#

Promise<Response>

Call Signature#

(input, init?): Promise<Response>

MDN Reference

Parameters#
input#

string | Request | URL

init?#

RequestInit

Returns#

Promise<Response>

language?#

readonly optional language?: string

Defined in: editor/src/lookup/index.ts:105

The language of labels and descriptions; "en" by default.

server#

readonly server: ServerOptions | null

Defined in: editor/src/lookup/index.ts:103

The server MusicBrainz is reached through; null leaves MusicBrainz out.

services?#

readonly optional services?: () => readonly Service[]

Defined in: editor/src/lookup/index.ts:112

The viewer’s services, read at every request (the editor gives its type profiles’); none by default.

Returns#

readonly Service[]

Variables#

lookupOf#

lookupOf: () => Lookup

Defined in: editor/src/lookup/index.ts:195

Returns#

Lookup


NO_LOOKUP#

const NO_LOOKUP: Lookup

Defined in: editor/src/lookup/index.ts:186

The lookup of an editor that looks nothing up: nothing searchable or resolvable, no request.


provideLookup#

provideLookup: (context) => Lookup

Defined in: editor/src/lookup/index.ts:195

Parameters#

context#

Lookup

Returns#

Lookup

Functions#

createLookup()#

createLookup(options): Lookup

Defined in: editor/src/lookup/index.ts:130

The lookup of the services options reach.

Parameters#

options#

LookupOptions

Returns#

Lookup

References#

Candidate#

Re-exports Candidate


CrossReference#

Re-exports CrossReference


ExtendValue#

Re-exports ExtendValue


LookupError#

Re-exports LookupError


LookupErrorCode#

Re-exports LookupErrorCode


ReconciliationCandidate#

Re-exports ReconciliationCandidate


ReconciliationClient#

Re-exports ReconciliationClient


ReconciliationOptions#

Re-exports ReconciliationOptions


ReconciliationQuery#

Re-exports ReconciliationQuery


ReconciliationType#

Re-exports ReconciliationType


ServiceManifest#

Re-exports ServiceManifest


ServicePath#

Re-exports ServicePath


Suggestion#

Re-exports Suggestion


VALUE_KINDS#

Re-exports VALUE_KINDS


ValueKind#

Re-exports ValueKind