<p dir="auto">I am getting following errors:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="node_modules/angular2/src/common/directives/ng_class.d.ts(72,35): error TS2304: Cannot find name 'Set'.
node_modules/angular2/src/core/change_detection/differs/default_keyvalue_differ.d.ts(23,15): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/core/change_detection/differs/default_keyvalue_differ.d.ts(25,16): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/core/di/reflective_provider.d.ts(103,123): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/core/di/reflective_provider.d.ts(103,165): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/facade/collection.d.ts(1,25): error TS2304: Cannot find name 'MapConstructor'.
node_modules/angular2/src/facade/collection.d.ts(2,25): error TS2304: Cannot find name 'SetConstructor'.
node_modules/angular2/src/facade/collection.d.ts(4,27): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/facade/collection.d.ts(4,39): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/facade/collection.d.ts(7,9): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/facade/collection.d.ts(8,30): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/facade/collection.d.ts(11,43): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/facade/collection.d.ts(12,27): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/facade/collection.d.ts(14,23): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/facade/collection.d.ts(15,25): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/facade/collection.d.ts(100,41): error TS2304: Cannot find name 'Set'.
node_modules/angular2/src/facade/collection.d.ts(101,22): error TS2304: Cannot find name 'Set'.
node_modules/angular2/src/facade/collection.d.ts(102,25): error TS2304: Cannot find name 'Set'.
node_modules/angular2/src/facade/lang.d.ts(4,17): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/facade/lang.d.ts(5,17): error TS2304: Cannot find name 'Set'.
node_modules/angular2/src/facade/lang.d.ts(71,59): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/platform/browser/browser_adapter.d.ts(75,33): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/platform/dom/dom_adapter.d.ts(85,42): error TS2304: Cannot find name 'Map'."><pre class="notranslate"><code class="notranslate">node_modules/angular2/src/common/directives/ng_class.d.ts(72,35): error TS2304: Cannot find name 'Set'.
node_modules/angular2/src/core/change_detection/differs/default_keyvalue_differ.d.ts(23,15): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/core/change_detection/differs/default_keyvalue_differ.d.ts(25,16): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/core/di/reflective_provider.d.ts(103,123): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/core/di/reflective_provider.d.ts(103,165): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/facade/collection.d.ts(1,25): error TS2304: Cannot find name 'MapConstructor'.
node_modules/angular2/src/facade/collection.d.ts(2,25): error TS2304: Cannot find name 'SetConstructor'.
node_modules/angular2/src/facade/collection.d.ts(4,27): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/facade/collection.d.ts(4,39): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/facade/collection.d.ts(7,9): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/facade/collection.d.ts(8,30): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/facade/collection.d.ts(11,43): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/facade/collection.d.ts(12,27): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/facade/collection.d.ts(14,23): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/facade/collection.d.ts(15,25): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/facade/collection.d.ts(100,41): error TS2304: Cannot find name 'Set'.
node_modules/angular2/src/facade/collection.d.ts(101,22): error TS2304: Cannot find name 'Set'.
node_modules/angular2/src/facade/collection.d.ts(102,25): error TS2304: Cannot find name 'Set'.
node_modules/angular2/src/facade/lang.d.ts(4,17): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/facade/lang.d.ts(5,17): error TS2304: Cannot find name 'Set'.
node_modules/angular2/src/facade/lang.d.ts(71,59): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/platform/browser/browser_adapter.d.ts(75,33): error TS2304: Cannot find name 'Map'.
node_modules/angular2/src/platform/dom/dom_adapter.d.ts(85,42): error TS2304: Cannot find name 'Map'.
</code></pre></div>
<p dir="auto">This is my tsd.json file after I have done <code class="notranslate">tsd update --save --overwrite</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
  &quot;version&quot;: &quot;v4&quot;,
  &quot;repo&quot;: &quot;borisyankov/DefinitelyTyped&quot;,
  &quot;ref&quot;: &quot;master&quot;,
  &quot;path&quot;: &quot;typings&quot;,
  &quot;bundle&quot;: &quot;typings/tsd.d.ts&quot;,
  &quot;installed&quot;: {
    &quot;es6-promise/es6-promise.d.ts&quot;: {
      &quot;commit&quot;: &quot;b332be4e133ae75c915c8dd2f4b1fe9ac4a45aa4&quot;
    },
    &quot;rx/rx.d.ts&quot;: {
      &quot;commit&quot;: &quot;b332be4e133ae75c915c8dd2f4b1fe9ac4a45aa4&quot;
    },
    &quot;rx/rx-lite.d.ts&quot;: {
      &quot;commit&quot;: &quot;b332be4e133ae75c915c8dd2f4b1fe9ac4a45aa4&quot;
    },
    &quot;jquery/jquery.d.ts&quot;: {
      &quot;commit&quot;: &quot;b332be4e133ae75c915c8dd2f4b1fe9ac4a45aa4&quot;
    },
    &quot;underscore/underscore.d.ts&quot;: {
      &quot;commit&quot;: &quot;b332be4e133ae75c915c8dd2f4b1fe9ac4a45aa4&quot;
    }
  }
}"><pre class="notranslate"><code class="notranslate">{
  "version": "v4",
  "repo": "borisyankov/DefinitelyTyped",
  "ref": "master",
  "path": "typings",
  "bundle": "typings/tsd.d.ts",
  "installed": {
    "es6-promise/es6-promise.d.ts": {
      "commit": "b332be4e133ae75c915c8dd2f4b1fe9ac4a45aa4"
    },
    "rx/rx.d.ts": {
      "commit": "b332be4e133ae75c915c8dd2f4b1fe9ac4a45aa4"
    },
    "rx/rx-lite.d.ts": {
      "commit": "b332be4e133ae75c915c8dd2f4b1fe9ac4a45aa4"
    },
    "jquery/jquery.d.ts": {
      "commit": "b332be4e133ae75c915c8dd2f4b1fe9ac4a45aa4"
    },
    "underscore/underscore.d.ts": {
      "commit": "b332be4e133ae75c915c8dd2f4b1fe9ac4a45aa4"
    }
  }
}
</code></pre></div>
<p dir="auto">Anyone any clue ?</p>
<h2 dir="auto">Update from <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/IgorMinar/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/IgorMinar">@IgorMinar</a> on 2014-11-10:</h2>
<p dir="auto">To summarize the constraints, the solution we are looking for must match the following:</p>
<ol dir="auto">
<li>Be valid HTML (see this <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=27228" rel="nofollow">issue</a> for discussion about <code class="notranslate">[</code>, <code class="notranslate">]</code>, <code class="notranslate">(</code>, <code class="notranslate">)</code> chars in attr name of valid html).</li>
<li>Be Web designer friendly</li>
<li>Interoperable with web-components (don't interfere with web component initialization)</li>
<li>Support debugging story via inspecting rendered DOM during development</li>
<li>The syntax must clearly distinguish between 1) string literal; 2) expression (binding); 3) expression (events) 4) declaration of variables. All of this must be clear from template without understanding which directives are active or what the internal semantics of these directives are.</li>
<li>Support additional info or options for each binding in order to avoid directive specific micro-syntaxes (this enables for tooling to work without hardcoding support for micro-syntaxes). This must be supported in a way that preserves constraint no. 5.</li>
</ol>
<p dir="auto">Please don't propose any new solutions that don't meet all of the criteria above.</p>
<hr>
<h2 dir="auto">Original description:</h2>
<p dir="auto">Current proposal for Angular2 syntax is</p>
<p dir="auto"><code class="notranslate">&lt;element #someId [bind]="expr" (event)="doWork()"&gt;</code></p>
<p dir="auto">There are several issues with this proposal which have come to light recently. These are:</p>
<h3 dir="auto"><code class="notranslate">element.setAttribute('[foo]', 'exp')</code> does not work.</h3>
<p dir="auto">In all browsers tested (Chrome, IE, Safari) the above is an error. This means that it is not possible to create a valid template programatically. It is still possible to parse and read the template.</p>
<p dir="auto">It seems like that calling <code class="notranslate">setAttribute</code> requires first character to be <code class="notranslate">a-z|_</code> specifically <code class="notranslate">-</code> is not allowed as starting character nor are any of these <code class="notranslate">~!@#$%^&amp;*(){}</code>.</p>
<h3 dir="auto">Third part HTML shorteners don't support non-standard characters.</h3>
<p dir="auto">Tools such as Slim, Haml, JADE don't support generating special characters. This would break the backend servers such as Ruby on Rails.</p>
<h3 dir="auto">SVG requires valid XML and <code class="notranslate">[]()#</code> is not valid XML.</h3>
<p dir="auto">This seems to be in the <a href="http://www.w3.org/TR/SVG/" rel="nofollow">spec</a>, but at least Chrome browser does not have issues with these characters. Need to investigate more.</p>
<h2 dir="auto">Straw-man Proposal</h2>
<p dir="auto">We go back to slightly longer text based syntax</p>
<p dir="auto"><code class="notranslate">&lt;element var="someId" bind-value="expr" on-event="doWork()"&gt;</code></p>
<p dir="auto">The caveat is the <code class="notranslate">ng-repeat</code> syntax, which requires a parameter</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;ul&gt;
  &lt;li bind-ng-repeat--item=&quot;items&quot;&gt;{{item}}&lt;/li&gt;
&lt;/ul&gt;"><pre class="notranslate"><code class="notranslate">&lt;ul&gt;
  &lt;li bind-ng-repeat--item="items"&gt;{{item}}&lt;/li&gt;
&lt;/ul&gt;
</code></pre></div>
<p dir="auto">Why the weird <code class="notranslate">ng-repeat</code> syntax? We want ta make sure that all bindings starting with <code class="notranslate">bind-</code> have right hand side as a valid expression. <code class="notranslate">item in items</code> is not a valid expression, it is a micro syntax. For this reason we need a way to pass the local-var-name into <code class="notranslate">ng-repeat</code> as a string literal, and not as an expression. Hence the <code class="notranslate">ng-repeat--&lt;local-var-name-literral&gt;="expression"</code>.</p>
<p dir="auto">Please leave your thoughts here.</p>
<h2 dir="auto">Background</h2>
<p dir="auto">The reasoning behind the new syntax can be found here: <a href="https://docs.google.com/document/d/1kpuR512G1b0D8egl9245OHaG0cFh0ST0ekhD_g8sxtI/edit#heading=h.xgjl2srtytjt" rel="nofollow">https://docs.google.com/document/d/1kpuR512G1b0D8egl9245OHaG0cFh0ST0ekhD_g8sxtI/edit#heading=h.xgjl2srtytjt</a></p>