CompletionItemProvider<T extends CompletionItem> constructor

CompletionItemProvider<T extends CompletionItem>({
  1. FutureOr<Object> provideCompletionItems(
    1. TextDocument,
    2. Position,
    3. CancellationToken,
    4. CompletionContext,
    )?,
  2. FutureOr<CompletionItem> resolveCompletionItem(
    1. CompletionItem,
    2. CancellationToken
    )?,
})

Implementation

factory CompletionItemProvider({
  _i4.FutureOr<_i2.Object> Function(
    _i3.TextDocument,
    _i3.Position,
    _i3.CancellationToken,
    _i3.CompletionContext,
  )? provideCompletionItems,
  _i4.FutureOr<_i3.CompletionItem> Function(
    _i3.CompletionItem,
    _i3.CancellationToken,
  )? resolveCompletionItem,
}) =>
    CompletionItemProvider._(
      provideCompletionItems: provideCompletionItems == null
          ? null
          : _i5.allowInterop((
              p0,
              p1,
              p2,
              p3,
            ) =>
              _i6.Promise.futureOr(() => provideCompletionItems(
                    p0,
                    p1,
                    p2,
                    p3,
                  ))),
      resolveCompletionItem: resolveCompletionItem == null
          ? null
          : _i5.allowInterop((
              p0,
              p1,
            ) =>
              _i6.Promise.futureOr(() => resolveCompletionItem(
                    p0,
                    p1,
                  ))),
    );