DocumentRangeFormattingEditProvider constructor

DocumentRangeFormattingEditProvider({
  1. FutureOr<List<TextEdit>> provideDocumentRangeFormattingEdits(
    1. TextDocument,
    2. Range,
    3. FormattingOptions,
    4. CancellationToken,
    )?,
  2. FutureOr<List<TextEdit>> provideDocumentRangesFormattingEdits(
    1. TextDocument,
    2. List<Range>,
    3. FormattingOptions,
    4. CancellationToken,
    )?,
})

Implementation

factory DocumentRangeFormattingEditProvider({
  _i4.FutureOr<_i2.List<_i3.TextEdit>> Function(
    _i3.TextDocument,
    _i3.Range,
    _i3.FormattingOptions,
    _i3.CancellationToken,
  )? provideDocumentRangeFormattingEdits,
  _i4.FutureOr<_i2.List<_i3.TextEdit>> Function(
    _i3.TextDocument,
    _i2.List<_i3.Range>,
    _i3.FormattingOptions,
    _i3.CancellationToken,
  )? provideDocumentRangesFormattingEdits,
}) =>
    DocumentRangeFormattingEditProvider._(
      provideDocumentRangeFormattingEdits:
          provideDocumentRangeFormattingEdits == null
              ? null
              : _i5.allowInterop((
                  p0,
                  p1,
                  p2,
                  p3,
                ) =>
                  _i6.Promise.futureOr(
                      () => provideDocumentRangeFormattingEdits(
                            p0,
                            p1,
                            p2,
                            p3,
                          ))),
      provideDocumentRangesFormattingEdits:
          provideDocumentRangesFormattingEdits == null
              ? null
              : _i5.allowInterop((
                  p0,
                  p1,
                  p2,
                  p3,
                ) =>
                  _i6.Promise.futureOr(
                      () => provideDocumentRangesFormattingEdits(
                            p0,
                            p1,
                            p2,
                            p3,
                          ))),
    );