FoldingRangeProvider constructor

FoldingRangeProvider({
  1. Event<void>? onDidChangeFoldingRanges,
  2. FutureOr<List<FoldingRange>> provideFoldingRanges(
    1. TextDocument,
    2. FoldingContext,
    3. CancellationToken
    )?,
})

Implementation

factory FoldingRangeProvider({
  _i3.Event<void>? onDidChangeFoldingRanges,
  _i4.FutureOr<_i2.List<_i3.FoldingRange>> Function(
    _i3.TextDocument,
    _i3.FoldingContext,
    _i3.CancellationToken,
  )? provideFoldingRanges,
}) =>
    FoldingRangeProvider._(
      onDidChangeFoldingRanges: onDidChangeFoldingRanges ?? _i6.undefined,
      provideFoldingRanges: provideFoldingRanges == null
          ? null
          : _i5.allowInterop((
              p0,
              p1,
              p2,
            ) =>
              _i6.Promise.futureOr(() => provideFoldingRanges(
                    p0,
                    p1,
                    p2,
                  ))),
    );