Skip to content

Commit bb87996

Browse files
parloughcommit-bot@chromium.org
authored andcommitted
Fix some dart sdk documentation issues
Mostly fixes unresolved references but fixes some other small issues as well Bug: #37880 Change-Id: I5747c3c90d66d23859e021fc6bd07cc7cd9700d2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103741 Commit-Queue: Samuel Rawlins <[email protected]> Reviewed-by: Lasse R.H. Nielsen <[email protected]> Reviewed-by: Zach Anderson <[email protected]>
1 parent 326c00c commit bb87996

File tree

9 files changed

+24
-24
lines changed

9 files changed

+24
-24
lines changed

sdk/lib/async/stream.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,9 +1096,9 @@ abstract class Stream<T> {
10961096
* When subscribing using [drain], cancelOnError will be true. This means
10971097
* that the future will complete with the first error on this stream and then
10981098
* cancel the subscription.
1099-
* If this stream emits an error, or the call to [combine] throws,
1100-
* the returned future is completed with that error,
1101-
* and processing is stopped.
1099+
*
1100+
* If this stream emits an error, the returned future is completed with
1101+
* that error, and processing is stopped.
11021102
*
11031103
* In case of a `done` event the future completes with the given
11041104
* [futureValue].

sdk/lib/convert/base64.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,18 @@ const Base64Codec base64Url = Base64Codec.urlSafe();
3535

3636
/// Encodes [bytes] using [base64](https://tools.ietf.org/html/rfc4648) encoding.
3737
///
38-
/// Shorthand for [base64.encode]. Useful if a local variable shadows the global
38+
/// Shorthand for `base64.encode`. Useful if a local variable shadows the global
3939
/// [base64] constant.
4040
String base64Encode(List<int> bytes) => base64.encode(bytes);
4141

4242
/// Encodes [bytes] using [base64url](https://tools.ietf.org/html/rfc4648) encoding.
4343
///
44-
/// Shorthand for [base64url.encode].
44+
/// Shorthand for `base64url.encode`.
4545
String base64UrlEncode(List<int> bytes) => base64Url.encode(bytes);
4646

4747
/// Decodes [base64](https://tools.ietf.org/html/rfc4648) or [base64url](https://tools.ietf.org/html/rfc4648) encoded bytes.
4848
///
49-
/// Shorthand for [base64.decode]. Useful if a local variable shadows the
49+
/// Shorthand for `base64.decode`. Useful if a local variable shadows the
5050
/// global [base64] constant.
5151
Uint8List base64Decode(String source) => base64.decode(source);
5252

sdk/lib/convert/json.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ const JsonCodec json = JsonCodec();
7474
/// If [toEncodable] is omitted, it defaults to a function that returns the
7575
/// result of calling `.toJson()` on the unencodable object.
7676
///
77-
/// Shorthand for [json.encode]. Useful if a local variable shadows the global
77+
/// Shorthand for `json.encode`. Useful if a local variable shadows the global
7878
/// [json] constant.
79-
String jsonEncode(Object object, {Object toEncodable(Object nonEncodable)}) =>
80-
json.encode(object, toEncodable: toEncodable);
79+
String jsonEncode(Object value, {Object toEncodable(Object nonEncodable)}) =>
80+
json.encode(value, toEncodable: toEncodable);
8181

8282
/// Parses the string and returns the resulting Json object.
8383
///
@@ -88,7 +88,7 @@ String jsonEncode(Object object, {Object toEncodable(Object nonEncodable)}) =>
8888
///
8989
/// The default [reviver] (when not provided) is the identity function.
9090
///
91-
/// Shorthand for [json.decode]. Useful if a local variable shadows the global
91+
/// Shorthand for `json.decode`. Useful if a local variable shadows the global
9292
/// [json] constant.
9393
dynamic jsonDecode(String source, {Object reviver(Object key, Object value)}) =>
9494
json.decode(source, reviver: reviver);

sdk/lib/core/map.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ abstract class Map<K, V> {
8383
* Creates an identity map with the default implementation, [LinkedHashMap].
8484
*
8585
* An identity map uses [identical] for equality and [identityHashCode]
86-
* for hash codes of keys instead of the intrinsic [Object.operator==] and
86+
* for hash codes of keys instead of the intrinsic [Object.==] and
8787
* [Object.hashCode] of the keys.
8888
*
8989
* The returned map allows `null` as a key.

sdk/lib/core/regexp.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ abstract class RegExp implements Pattern {
152152
* character is a line terminator. When true, then the "." character will
153153
* match any single character including line terminators.
154154
*
155-
* This feature is distinct from [isMultiline], as they affect the behavior
155+
* This feature is distinct from [isMultiLine], as they affect the behavior
156156
* of different pattern characters, and so they can be used together or
157157
* separately.
158158
*/

sdk/lib/io/socket.dart

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -406,16 +406,16 @@ enum _RawSocketOptions {
406406
IPPROTO_UDP, // 6
407407
}
408408

409-
/// The [RawSocketOption] is used as a parameter to [Socket.setRawOption] and
410-
/// [RawSocket.setRawOption] to set customize the behaviour of the underlying
411-
/// socket.
409+
/// The [RawSocketOption] is used as a parameter to [Socket.setRawOption],
410+
/// [RawSocket.setRawOption], and [RawDatagramSocket.setRawOption] to customize
411+
/// the behaviour of the underlying socket.
412412
///
413-
/// It allows for fine grained control of the socket options, and its values will
414-
/// be passed to the underlying platform's implementation of setsockopt and
415-
/// getsockopt.
413+
/// It allows for fine grained control of the socket options, and its values
414+
/// will be passed to the underlying platform's implementation of `setsockopt`
415+
/// and `getsockopt`.
416416
@Since("2.2")
417417
class RawSocketOption {
418-
/// Creates a RawSocketOption for getRawOption andSetRawOption.
418+
/// Creates a [RawSocketOption] for `getRawOption` and `setRawOption`.
419419
///
420420
/// All arguments are required and must not be null.
421421
///
@@ -425,10 +425,10 @@ class RawSocketOption {
425425
/// The value argument and its length correspond to the optval and length
426426
/// arguments on the native call.
427427
///
428-
/// For a [getRawOption] call, the value parameter will be updated after a
428+
/// For a `getRawOption` call, the value parameter will be updated after a
429429
/// successful call (although its length will not be changed).
430430
///
431-
/// For a [setRawOption] call, the value parameter will be used set the
431+
/// For a `setRawOption` call, the value parameter will be used set the
432432
/// option.
433433
const RawSocketOption(this.level, this.option, this.value);
434434

sdk/lib/io/stdio.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Stdin extends _StdStream implements Stream<List<int>> {
3939
* Blocks until a full line is available.
4040
*
4141
* Lines my be terminated by either `<CR><LF>` or `<LF>`. On Windows in cases
42-
* where the [stdioType] of stdin is [StdioType.termimal] the terminator may
42+
* where the [stdioType] of stdin is [StdioType.terminal] the terminator may
4343
* also be a single `<CR>`.
4444
*
4545
* Input bytes are converted to a string by [encoding].

sdk/lib/js/dart2js/js_dart2js.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
/// Functions and closures are proxied in such a way that they are callable. A
5757
/// Dart closure assigned to a JavaScript property is proxied by a function in
5858
/// JavaScript. A JavaScript function accessed from Dart is proxied by a
59-
/// [JsFunction], which has a [apply] method to invoke it.
59+
/// [JsFunction], which has a [JsFunction.apply] method to invoke it.
6060
///
6161
/// The following types are transferred directly and not proxied:
6262
///

sdk/lib/math/random.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ part of dart.math;
99
/// The default implementation supplies a stream of pseudo-random bits that are
1010
/// not suitable for cryptographic purposes.
1111
///
12-
/// Use the [Random.secure]() constructor for cryptographic purposes.
12+
/// Use the [Random.secure] constructor for cryptographic purposes.
1313
abstract class Random {
1414
/// Creates a random number generator.
1515
///

0 commit comments

Comments
 (0)