TextDocument constructor
TextDocument({
- Uri? uri,
- String? fileName,
- bool? isUntitled,
- String? languageId,
- num? version,
- bool? isDirty,
- bool? isClosed,
- EndOfLine? eol,
- num? lineCount,
- Future save()?,
- num offsetAt()?,
- Position positionAt()?,
- String getText([])?,
- Range? getWordRangeAtPosition(])?,
- Range validateRange()?,
- Position validatePosition()?,
Implementation
factory TextDocument({
_i3.Uri? uri,
_i2.String? fileName,
_i2.bool? isUntitled,
_i2.String? languageId,
_i2.num? version,
_i2.bool? isDirty,
_i2.bool? isClosed,
_i3.EndOfLine? eol,
_i2.num? lineCount,
_i2.Future<_i2.dynamic> Function()? save,
_i2.num Function(_i3.Position)? offsetAt,
_i3.Position Function(_i2.num)? positionAt,
_i2.String Function([_i3.Range?])? getText,
_i3.Range? Function(
_i3.Position, [
_i7.RegExp?,
])? getWordRangeAtPosition,
_i3.Range Function(_i3.Range)? validateRange,
_i3.Position Function(_i3.Position)? validatePosition,
}) =>
TextDocument._(
uri: uri ?? _i6.undefined,
fileName: fileName,
isUntitled: isUntitled,
languageId: languageId,
version: version,
isDirty: isDirty,
isClosed: isClosed,
eol: eol?.name,
lineCount: lineCount,
save: save == null ? null : _i5.allowInterop(save),
offsetAt: offsetAt == null ? null : _i5.allowInterop(offsetAt),
positionAt: positionAt == null ? null : _i5.allowInterop(positionAt),
getText: getText == null ? null : _i5.allowInterop(getText),
getWordRangeAtPosition: getWordRangeAtPosition == null
? null
: _i5.allowInterop((
p0,
p1,
) =>
() =>
getWordRangeAtPosition(
p0,
p1,
) ??
_i6.undefined),
validateRange:
validateRange == null ? null : _i5.allowInterop(validateRange),
validatePosition: validatePosition == null
? null
: _i5.allowInterop(validatePosition),
);