TextDocumentContentProvider constructor

TextDocumentContentProvider({
  1. Event<Uri>? onDidChange,
  2. FutureOr<String> provideTextDocumentContent(
    1. Uri,
    2. CancellationToken
    )?,
})

Implementation

factory TextDocumentContentProvider({
  _i3.Event<_i3.Uri>? onDidChange,
  _i4.FutureOr<_i2.String> Function(
    _i3.Uri,
    _i3.CancellationToken,
  )? provideTextDocumentContent,
}) =>
    TextDocumentContentProvider._(
      onDidChange: onDidChange ?? _i6.undefined,
      provideTextDocumentContent: provideTextDocumentContent == null
          ? null
          : _i5.allowInterop((
              p0,
              p1,
            ) =>
              _i6.Promise.futureOr(() => provideTextDocumentContent(
                    p0,
                    p1,
                  ))),
    );