Skip to content

Commit 020a59e

Browse files
srawlinsCommit Queue
authored and
Commit Queue
committed
js_interop: replace unsupported [this] comment references with this.
Work towards dart-lang/dartdoc#3761 Sibling CL to https://dart-review.googlesource.com/c/sdk/+/365204 The analyzer has never recognized `[this]` as a valid doc comment reference (and the `comment_references` lint rule has similarly reported such reference attempts). dartdoc has its own algorithms for resolving comment references, which we are dismantling in favor of a single resolution, provided by the analyzer. We've also decided against adding support in the analyzer (see https://github.com/dart-lang/linter/issues/2079), so these reference attempts should be re-written. CoreLibraryReviewExempt: Comments only. Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try Change-Id: I38dd476e40e4508fb6bf88c28415ff261bae5f43 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366880 Reviewed-by: Srujan Gaddam <[email protected]> Commit-Queue: Srujan Gaddam <[email protected]> Auto-Submit: Samuel Rawlins <[email protected]>
1 parent 3ca4243 commit 020a59e

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

sdk/lib/js_interop/js_interop.dart

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,69 +1084,69 @@ extension StringToJSString on String {
10841084
extension JSAnyOperatorExtension on JSAny? {
10851085
// Arithmetic operators.
10861086

1087-
/// The result of <code>[this] + [any]</code> in JavaScript.
1087+
/// The result of <code>`this` + [any]</code> in JavaScript.
10881088
external JSAny add(JSAny? any);
10891089

1090-
/// The result of <code>[this] - [any]</code> in JavaScript.
1090+
/// The result of <code>`this` - [any]</code> in JavaScript.
10911091
external JSAny subtract(JSAny? any);
10921092

1093-
/// The result of <code>[this] * [any]</code> in JavaScript.
1093+
/// The result of <code>`this` * [any]</code> in JavaScript.
10941094
external JSAny multiply(JSAny? any);
10951095

1096-
/// The result of <code>[this] / [any]</code> in JavaScript.
1096+
/// The result of <code>`this` / [any]</code> in JavaScript.
10971097
external JSAny divide(JSAny? any);
10981098

1099-
/// The result of <code>[this] % [any]</code> in JavaScript.
1099+
/// The result of <code>`this` % [any]</code> in JavaScript.
11001100
external JSAny modulo(JSAny? any);
11011101

1102-
/// The result of <code>[this] ** [any]</code> in JavaScript.
1102+
/// The result of <code>`this` ** [any]</code> in JavaScript.
11031103
external JSAny exponentiate(JSAny? any);
11041104

11051105
// Comparison operators.
11061106

1107-
/// The result of <code>[this] > [any]</code> in JavaScript.
1107+
/// The result of <code>`this` > [any]</code> in JavaScript.
11081108
external JSBoolean greaterThan(JSAny? any);
11091109

1110-
/// The result of <code>[this] >= [any]</code> in JavaScript.
1110+
/// The result of <code>`this` >= [any]</code> in JavaScript.
11111111
external JSBoolean greaterThanOrEqualTo(JSAny? any);
11121112

1113-
/// The result of <code>[this] < [any]</code> in JavaScript.
1113+
/// The result of <code>`this` < [any]</code> in JavaScript.
11141114
external JSBoolean lessThan(JSAny? any);
11151115

1116-
/// The result of <code>[this] <= [any]</code> in JavaScript.
1116+
/// The result of <code>`this` <= [any]</code> in JavaScript.
11171117
external JSBoolean lessThanOrEqualTo(JSAny? any);
11181118

1119-
/// The result of <code>[this] == [any]</code> in JavaScript.
1119+
/// The result of <code>`this` == [any]</code> in JavaScript.
11201120
external JSBoolean equals(JSAny? any);
11211121

1122-
/// The result of <code>[this] != [any]</code> in JavaScript.
1122+
/// The result of <code>`this` != [any]</code> in JavaScript.
11231123
external JSBoolean notEquals(JSAny? any);
11241124

1125-
/// The result of <code>[this] === [any]</code> in JavaScript.
1125+
/// The result of <code>`this` === [any]</code> in JavaScript.
11261126
external JSBoolean strictEquals(JSAny? any);
11271127

1128-
/// The result of <code>[this] !== [any]</code> in JavaScript.
1128+
/// The result of <code>`this` !== [any]</code> in JavaScript.
11291129
external JSBoolean strictNotEquals(JSAny? any);
11301130

11311131
// Bitwise operators.
11321132

1133-
/// The result of <code>[this] >>> [any]</code> in JavaScript.
1133+
/// The result of <code>`this` >>> [any]</code> in JavaScript.
11341134
// TODO(srujzs): This should return `num` or `double` instead.
11351135
external JSNumber unsignedRightShift(JSAny? any);
11361136

11371137
// Logical operators.
11381138

1139-
/// The result of <code>[this] && [any]</code> in JavaScript.
1139+
/// The result of <code>`this` && [any]</code> in JavaScript.
11401140
external JSAny? and(JSAny? any);
11411141

1142-
/// The result of <code>[this] || [any]</code> in JavaScript.
1142+
/// The result of <code>`this` || [any]</code> in JavaScript.
11431143
external JSAny? or(JSAny? any);
11441144

1145-
/// The result of <code>![this]</code> in JavaScript.
1145+
/// The result of <code>!`this`</code> in JavaScript.
11461146
// TODO(srujzs): Change this to JSBoolean to be consistent.
11471147
external bool get not;
11481148

1149-
/// The result of <code>!![this]</code> in JavaScript.
1149+
/// The result of <code>!!`this`</code> in JavaScript.
11501150
// TODO(srujzs): Change this to JSBoolean to be consistent.
11511151
external bool get isTruthy;
11521152
}

0 commit comments

Comments
 (0)