DocumentLinkProvider<T extends DocumentLink> constructor

DocumentLinkProvider<T extends DocumentLink>({
  1. FutureOr<List<DocumentLink>> provideDocumentLinks(
    1. TextDocument,
    2. CancellationToken
    )?,
  2. FutureOr<DocumentLink> resolveDocumentLink(
    1. DocumentLink,
    2. CancellationToken
    )?,
})

Implementation

factory DocumentLinkProvider({
  _i4.FutureOr<_i2.List<_i3.DocumentLink>> Function(
    _i3.TextDocument,
    _i3.CancellationToken,
  )? provideDocumentLinks,
  _i4.FutureOr<_i3.DocumentLink> Function(
    _i3.DocumentLink,
    _i3.CancellationToken,
  )? resolveDocumentLink,
}) =>
    DocumentLinkProvider._(
      provideDocumentLinks: provideDocumentLinks == null
          ? null
          : _i5.allowInterop((
              p0,
              p1,
            ) =>
              _i6.Promise.futureOr(() => provideDocumentLinks(
                    p0,
                    p1,
                  ))),
      resolveDocumentLink: resolveDocumentLink == null
          ? null
          : _i5.allowInterop((
              p0,
              p1,
            ) =>
              _i6.Promise.futureOr(() => resolveDocumentLink(
                    p0,
                    p1,
                  ))),
    );