Use type "any" instead of "JsonLdInput" in WebIDL definition
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Sun, 05 May 2013 18:27:21 +0200
changeset 1627 530d5f77b653
parent 1626 6e809b352d83
child 1628 c7036e6ac261
Use type "any" instead of "JsonLdInput" in WebIDL definition

JsonLdInput is problematic as object and object[] are not distinguishable according the WebIDL spec. Since the expansion algorithm is written generic enough, this shouldn't change anything but the WebIDL definition.

/cc @dlongley
spec/latest/json-ld-api/index.html
--- a/spec/latest/json-ld-api/index.html	Sun May 05 18:16:00 2013 +0200
+++ b/spec/latest/json-ld-api/index.html	Sun May 05 18:27:21 2013 +0200
@@ -3787,7 +3787,7 @@
         </ol>
 
         <dl class="parameters">
-          <dt>JsonLdInput input</dt>
+          <dt>any input</dt>
            <dd>The JSON-LD object or array of JSON-LD objects to perform the compaction upon or an
             <tref>IRI</tref> referencing the JSON-LD document to compact.</dd>
           <dt>JsonLdContext context</dt>
@@ -3833,7 +3833,7 @@
         </ol>
 
         <dl class="parameters">
-          <dt>JsonLdInput input</dt>
+          <dt>any input</dt>
           <dd>The JSON-LD object or array of JSON-LD objects to perform the expansion upon or an
             <tref>IRI</tref> referencing the JSON-LD document to expand.</dd>
           <dt>optional JsonLdOptions options</dt>
@@ -3886,7 +3886,7 @@
         </ol>
 
         <dl class="parameters">
-          <dt>JsonLdInput input</dt>
+          <dt>any input</dt>
            <dd>The JSON-LD object or array of JSON-LD objects or an <tref>IRI</tref>
             referencing the JSON-LD document to flatten.</dd>
           <dt>optional JsonLdContext? context</dt>
@@ -3901,14 +3901,6 @@
       </dd>
     </dl>
 
-    <p class="issue">According the current [[WEBIDL]] specification the following
-      two types are non-distinguishable. Shall we combine them?</p>
-
-    <div class="idl" title="typedef (object or object[] or DOMString) JsonLdInput">
-      <p>The identifier <a>JsonLdInput</a> is used to refer to the
-        <span class="idlTypedefType">(object or object[] or DOMString)</span> type.</p>
-    </div>
-
     <div class='idl' title='typedef (object or DOMString) JsonLdContext'>
       <p>The identifier <a>JsonLdContext</a> is used to refer to the
         <span class="idlTypedefType">(object or DOMString)</span> type.</p>