Skip to content

Commit 8ebee1f

Browse files
michaelficarradomenic
authored andcommitted
Editorial: replace uses of the Type macro with is-a tests
1 parent 4d33866 commit 8ebee1f

File tree

1 file changed

+27
-10
lines changed

1 file changed

+27
-10
lines changed

index.bs

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,26 @@ urlPrefix: https://tc39.es/ecma262/; spec: ECMASCRIPT
3939
text: the current Realm; url: #current-realm
4040
text: the typed array constructors table; url: #table-49
4141
text: typed array; url: #sec-typedarray-objects
42+
url: sec-ecmascript-language-types-bigint-type
43+
text: is a BigInt
44+
text: is not a BigInt
45+
url: sec-ecmascript-language-types-boolean-type
46+
text: is a Boolean
47+
text: is not a Boolean
48+
url: sec-ecmascript-language-types-number-type
49+
text: is a Number
50+
text: is not a Number
51+
url: sec-ecmascript-language-types-string-type
52+
text: is a String
53+
text: is not a String
54+
url: sec-ecmascript-language-types-symbol-type
55+
text: is a Symbol
56+
text: is not a Symbol
57+
url: sec-object-type
58+
text: is an Object
59+
text: is not an Object
4260
type: abstract-op
4361
text: IsInteger; url: #sec-isinteger
44-
text: Type; url: #sec-ecmascript-data-types-and-values
4562
text: TypeError; url: #sec-native-error-types-used-in-this-standard-typeerror; type: exception
4663
text: map; url: #sec-array.prototype.map; type: method; for: Array.prototype
4764
</pre>
@@ -2160,7 +2177,7 @@ The following abstract operations operate on {{ReadableStream}} instances at a h
21602177
1. Let |nextPromise| be [=a promise resolved with=] |nextResult|.\[[Value]].
21612178
1. Return the result of [=reacting=] to |nextPromise| with the following fulfillment steps,
21622179
given |iterResult|:
2163-
1. If [$Type$](|iterResult|) is not Object, throw a {{TypeError}}.
2180+
1. If |iterResult| [=is not an Object=], throw a {{TypeError}}.
21642181
1. Let |done| be ? [$IteratorComplete$](|iterResult|).
21652182
1. If |done| is true:
21662183
1. Perform ! [$ReadableStreamDefaultControllerClose$](|stream|.[=ReadableStream/[[controller]]=]).
@@ -2182,7 +2199,7 @@ The following abstract operations operate on {{ReadableStream}} instances at a h
21822199
1. Let |returnPromise| be [=a promise resolved with=] |returnResult|.\[[Value]].
21832200
1. Return the result of [=reacting=] to |returnPromise| with the following fulfillment steps,
21842201
given |iterResult|:
2185-
1. If [$Type$](|iterResult|) is not Object, throw a {{TypeError}}.
2202+
1. If |iterResult| [=is not an Object=], throw a {{TypeError}}.
21862203
1. Return undefined.
21872204
1. Set |stream| to ! [$CreateReadableStream$](|startAlgorithm|, |pullAlgorithm|, |cancelAlgorithm|,
21882205
0).
@@ -6673,10 +6690,10 @@ abstract operations are used to implement these "cross-realm transforms".
66736690
1. Let |controller| be a [=new=] {{ReadableStreamDefaultController}}.
66746691
1. Add a handler for |port|'s {{MessagePort/message}} event with the following steps:
66756692
1. Let |data| be the data of the message.
6676-
1. Assert: [$Type$](|data|) is Object.
6693+
1. Assert: |data| [=is an Object=].
66776694
1. Let |type| be ! [$Get$](|data|, "`type`").
66786695
1. Let |value| be ! [$Get$](|data|, "`value`").
6679-
1. Assert: [$Type$](|type|) is String.
6696+
1. Assert: |type| [=is a String=].
66806697
1. If |type| is "`chunk`",
66816698
1. Perform ! [$ReadableStreamDefaultControllerEnqueue$](|controller|, |value|).
66826699
1. Otherwise, if |type| is "`close`",
@@ -6718,10 +6735,10 @@ abstract operations are used to implement these "cross-realm transforms".
67186735
1. Let |backpressurePromise| be [=a new promise=].
67196736
1. Add a handler for |port|'s {{MessagePort/message}} event with the following steps:
67206737
1. Let |data| be the data of the message.
6721-
1. Assert: [$Type$](|data|) is Object.
6738+
1. Assert: |data| [=is an Object=].
67226739
1. Let |type| be ! [$Get$](|data|, "`type`").
67236740
1. Let |value| be ! [$Get$](|data|, "`value`").
6724-
1. Assert: [$Type$](|type|) is String.
6741+
1. Assert: |type| [=is a String=].
67256742
1. If |type| is "`pull`",
67266743
1. If |backpressurePromise| is not undefined,
67276744
1. [=Resolve=] |backpressurePromise| with undefined.
@@ -6775,7 +6792,7 @@ The following abstract operations are a grab-bag of utilities.
67756792
<dfn abstract-op lt="CanTransferArrayBuffer"
67766793
id="can-transfer-array-buffer">CanTransferArrayBuffer(|O|)</dfn> performs the following steps:
67776794

6778-
1. Assert: [$Type$](|O|) is Object.
6795+
1. Assert: |O| [=is an Object=].
67796796
1. Assert: |O| has an \[[ArrayBufferData]] internal slot.
67806797
1. If ! [$IsDetachedBuffer$](|O|) is true, return false.
67816798
1. If [$SameValue$](|O|.\[[ArrayBufferDetachKey]], undefined) is false, return false.
@@ -6786,7 +6803,7 @@ The following abstract operations are a grab-bag of utilities.
67866803
<dfn abstract-op lt="IsNonNegativeNumber"
67876804
id="is-non-negative-number">IsNonNegativeNumber(|v|)</dfn> performs the following steps:
67886805

6789-
1. If [$Type$](|v|) is not Number, return false.
6806+
1. If |v| [=is not a Number=], return false.
67906807
1. If |v| is NaN, return false.
67916808
1. If |v| &lt; 0, return false.
67926809
1. Return true.
@@ -6811,7 +6828,7 @@ The following abstract operations are a grab-bag of utilities.
68116828
<div algorithm>
68126829
<dfn abstract-op lt="CloneAsUint8Array">CloneAsUint8Array(|O|)</dfn> performs the following steps:
68136830

6814-
1. Assert: [$Type$](|O|) is Object.
6831+
1. Assert: |O| [=is an Object=].
68156832
1. Assert: |O| has an \[[ViewedArrayBuffer]] internal slot.
68166833
1. Assert: ! [$IsDetachedBuffer$](|O|.\[[ViewedArrayBuffer]]) is false.
68176834
1. Let |buffer| be ? [$CloneArrayBuffer$](|O|.\[[ViewedArrayBuffer]], |O|.\[[ByteOffset]],

0 commit comments

Comments
 (0)