DocumentSemanticTokensProvider constructor

DocumentSemanticTokensProvider({
  1. Event<void>? onDidChangeSemanticTokens,
  2. FutureOr<SemanticTokens> provideDocumentSemanticTokens(
    1. TextDocument,
    2. CancellationToken
    )?,
  3. FutureOr<Object> provideDocumentSemanticTokensEdits(
    1. TextDocument,
    2. String,
    3. CancellationToken
    )?,
})

Implementation

factory DocumentSemanticTokensProvider({
  _i3.Event<void>? onDidChangeSemanticTokens,
  _i4.FutureOr<_i3.SemanticTokens> Function(
    _i3.TextDocument,
    _i3.CancellationToken,
  )? provideDocumentSemanticTokens,
  _i4.FutureOr<_i2.Object> Function(
    _i3.TextDocument,
    _i2.String,
    _i3.CancellationToken,
  )? provideDocumentSemanticTokensEdits,
}) =>
    DocumentSemanticTokensProvider._(
      onDidChangeSemanticTokens: onDidChangeSemanticTokens ?? _i6.undefined,
      provideDocumentSemanticTokens: provideDocumentSemanticTokens == null
          ? null
          : _i5.allowInterop((
              p0,
              p1,
            ) =>
              _i6.Promise.futureOr(() => provideDocumentSemanticTokens(
                    p0,
                    p1,
                  ))),
      provideDocumentSemanticTokensEdits:
          provideDocumentSemanticTokensEdits == null
              ? null
              : _i5.allowInterop((
                  p0,
                  p1,
                  p2,
                ) =>
                  _i6.Promise.futureOr(
                      () => provideDocumentSemanticTokensEdits(
                            p0,
                            p1,
                            p2,
                          ))),
    );