From ae8b5bd92e4ddc0dd69db60445cad3a2c46f8dc2 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Thu, 27 Jun 2019 17:25:35 +0200 Subject: [PATCH 1/2] Explicitly include annotated types in the various type categories. Fixes #670. --- index.bs | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/index.bs b/index.bs index 923740a9..ea46b848 100644 --- a/index.bs +++ b/index.bs @@ -5313,22 +5313,28 @@ The following types are known as integer types {{unsigned short}}, {{long}}, {{unsigned long}}, -{{long long}} and -{{unsigned long long}}. +{{long long}}, +{{unsigned long long}}, +and any [=annotated types=] whose [=annotated types/inner type=] is an [=integer type=]. The following types are known as numeric types: the [=integer types=], {{float}}, {{unrestricted float}}, -{{double}} and -{{unrestricted double}}. +{{double}}, +{{unrestricted double}}, +and any [=annotated types=] whose [=annotated types/inner type=] is a [=numeric type=]. The primitive types are -{{boolean}} and the [=numeric types=]. +{{boolean}}, +the [=numeric types=], +and any [=annotated types=] whose [=annotated types/inner type=] is a [=primitive type=]. The string types are {{DOMString}}, all [=enumeration types=], -{{ByteString}} and {{USVString}}. +{{ByteString}}, +{{USVString}}, +and any [=annotated types=] whose [=annotated types/inner type=] is a [=string type=]. The typed array types are {{Int8Array}}, @@ -5338,18 +5344,21 @@ The typed array types are {{Uint16Array}}, {{Uint32Array}}, {{Uint8ClampedArray}}, -{{Float32Array}} and -{{Float64Array}}. +{{Float32Array}}, +{{Float64Array}}, +and any [=annotated types=] whose [=annotated types/inner type=] is a [=typed array type=]. -The buffer source types -are {{ArrayBuffer}}, +The buffer source types are +{{ArrayBuffer}}, {{DataView}}, -and the [=typed array types=]. - -The {{object}} type, -all [=interface types=], and -all [=callback interface types=] -are known as object types. +the [=typed array types=], +and any [=annotated types=] whose [=annotated types/inner type=] is a [=buffer source type=]. + +The object types are +the {{object}} type, +all [=interface types=], +all [=callback interface types=], +and any [=annotated types=] whose [=annotated types/inner type=] is an [=object type=]. Every type has a type name, which is a string, not necessarily unique, that identifies the type. From 4bb39f3e226fa03855a7466f2282f3944cf8abf3 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Fri, 28 Jun 2019 12:54:08 +0200 Subject: [PATCH 2/2] Also include nullable types in the various type categories. --- index.bs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/index.bs b/index.bs index ea46b848..b842fb09 100644 --- a/index.bs +++ b/index.bs @@ -5315,6 +5315,7 @@ The following types are known as integer types {{unsigned long}}, {{long long}}, {{unsigned long long}}, +any [=nullable types=] whose [=nullable types/inner type=] is an [=integer type=], and any [=annotated types=] whose [=annotated types/inner type=] is an [=integer type=]. The following types are known as numeric types: @@ -5323,17 +5324,20 @@ the [=integer types=], {{unrestricted float}}, {{double}}, {{unrestricted double}}, +any [=nullable types=] whose [=nullable types/inner type=] is a [=numeric type=], and any [=annotated types=] whose [=annotated types/inner type=] is a [=numeric type=]. The primitive types are {{boolean}}, the [=numeric types=], +any [=nullable types=] whose [=nullable types/inner type=] is a [=primitive type=], and any [=annotated types=] whose [=annotated types/inner type=] is a [=primitive type=]. The string types are {{DOMString}}, all [=enumeration types=], {{ByteString}}, {{USVString}}, +any [=nullable types=] whose [=nullable types/inner type=] is a [=string type=], and any [=annotated types=] whose [=annotated types/inner type=] is a [=string type=]. The typed array types are @@ -5346,18 +5350,21 @@ The typed array types are {{Uint8ClampedArray}}, {{Float32Array}}, {{Float64Array}}, +any [=nullable types=] whose [=nullable types/inner type=] is a [=typed array type=], and any [=annotated types=] whose [=annotated types/inner type=] is a [=typed array type=]. The buffer source types are {{ArrayBuffer}}, {{DataView}}, the [=typed array types=], +any [=nullable types=] whose [=nullable types/inner type=] is a [=buffer source type=], and any [=annotated types=] whose [=annotated types/inner type=] is a [=buffer source type=]. The object types are the {{object}} type, all [=interface types=], all [=callback interface types=], +any [=nullable types=] whose [=nullable types/inner type=] is an [=object type=], and any [=annotated types=] whose [=annotated types/inner type=] is an [=object type=]. Every type has a type name, which