<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mike Fairhurst on Medium]]></title>
        <description><![CDATA[Stories by Mike Fairhurst on Medium]]></description>
        <link>https://medium.com/@mfairhurst?source=rss-c9094de7d9b1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*dtDujtysqs_DBFUb.</url>
            <title>Stories by Mike Fairhurst on Medium</title>
            <link>https://medium.com/@mfairhurst?source=rss-c9094de7d9b1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 12:35:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mfairhurst/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Future<void> vs Future<Null>, what’s the difference?]]></title>
            <link>https://medium.com/dartlang/future-void-vs-future-null-whats-the-difference-84a42d616e7d?source=rss-c9094de7d9b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/84a42d616e7d</guid>
            <category><![CDATA[programming-languages]]></category>
            <category><![CDATA[dartlang]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[type-theory]]></category>
            <dc:creator><![CDATA[Mike Fairhurst]]></dc:creator>
            <pubDate>Tue, 30 Oct 2018 17:26:22 GMT</pubDate>
            <atom:updated>2018-10-30T17:26:22.755Z</atom:updated>
            <content:encoded><![CDATA[<p>One of the nice upgrades we were able to do in <a href="https://medium.com/dartlang/dart-2-stable-and-the-dart-web-platform-3775d5f8eac7">Dart 2</a> (in addition to better static checking, runtime type safety, optional new/const, core library improvements, and more) is to formalize void in a way that’s both more useful and less error-prone. This is especially clean in async programming where you can write Future&lt;void&gt; for asynchronous functions that don’t return an answer when their work completes. Before this you probably used Future&lt;Null&gt;, so common questions we get asked are: What’s the difference between Future&lt;void&gt; and Future&lt;Null&gt;? Which should I use, and when?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*x0J9DBRyATjtQn42" /></figure><p>Since my goal here is to be useful, I’m going to start with a TLDR.</p><p>TL;DR: <strong>You want to use the void type 99.99% of the time.</strong></p><p>I also recommend you turn on two void-related <a href="https://www.dartlang.org/guides/language/analysis-options">lint rules</a> in your projects, right now:</p><ul><li><strong>prefer_void_to_null:</strong> Helps keep you from slipping back into the habit of typing the mostly-antiquated Null.</li><li><strong>void_checks:</strong> Gives you voidness semantics that you may find more intuitive, even though they are not strictly necessary for safe code.</li></ul><p>The rest of this article is not light reading. It is a combination of history, edge cases, and type theory. What I’m about to write is like trying to explain a <a href="https://en.wikipedia.org/wiki/Monad_(functional_programming)">Monad</a>, but I’ll do my best, and I hope you follow along for the ride.</p><h3>Quick Future&lt;Null&gt; trivia</h3><p>To demonstrate the value you might get out of reading this post, I pose a trivia question for you.</p><p>Say we limit ourselves to two Futures — a Future&lt;User&gt; and a Future&lt;Null&gt;. What do the following lines of code do?</p><pre>// does this fail in your editor?<br>Future&lt;User&gt; f1 = Future&lt;Null&gt;.value(null);</pre><pre>// does this fail at runtime?<br>Future&lt;Null&gt; f2 = Future&lt;User&gt;.value(0);</pre><p>Does it help if we switch to awaits?</p><pre>User u = await Future&lt;Null&gt;.value(null);<br>Null n = await Future&lt;User&gt;.value(0);</pre><p><em>*pauses for dramatic effect*</em></p><p>The answer is that none of these four lines will show any errors in your editor, unless you have disabled implicit downcasts. That’s right, taking a Future&lt;Null&gt; and pretending it’s something it isn’t, like Future&lt;User&gt;, is 100% legal. This is not the case with Future&lt;void&gt;!</p><p>Also unintuitively, the second and fourth lines fail at runtime (it’s not “safe” to throw away the result of a Future in this way), and the others succeed silently.</p><p>These behaviors should make you uncomfortable. But don’t worry! You already know the solution: use Future&lt;void&gt;. I’ll break down why this unintuitive behavior works this way.</p><h3>How void works now</h3><p>I debated a lot to myself about what the best ordering would be for this article. There are lots of concepts to explain here. However, I will try to go in order of most useful information to least useful information. Therefore, with void being much more useful than Null in Dart 2, it makes sense to start with Dart 2 void semantics.</p><p>The fundamental idea behind void in Dart is derived from the goal that a void value should not be used.</p><pre>void f() {}<br>print(f()); // error!</pre><p>This is hopefully what you expect to happen! So with that, so far so good.</p><p>It’s worth noting that achieving this goal <em>and</em> opening up void as a fairly normal type can get a bit weird:</p><pre>f(void argument) {<br>  print(argument); // Error!<br>  // we can receive the argument, but we may not use it!<br>}</pre><p>And this is where, in Dart 2, our new “generalized void” starts to get cool, and powerful…albeit sometimes confusing.</p><p>I pose the question to you…what type of value could we pass in as the argument of f?</p><pre>f(void argument) { … }<br>f(x); // what is x?</pre><p>The answer to this is…anything! Because we don’t let you use the value of x inside the function f, we can confidently say that there <em>is no value</em> that x can take <em>that could cause any runtime errors</em>.</p><pre>f(1); // will have no difference compared to<br>f(“foo”); // will have no difference compared to<br>f([1, 2, 3]); // will have no difference compared to<br>// ...</pre><p>If we derive the best semantics for void based on the idea that it is a value that will not be <em>used</em>, this is what we get. Which means, it’s a value that can be <em>filled</em> with absolutely anything. It’s like a vacuum: an input with no output.</p><p>Now, there are cases where something is always error-free at runtime, but still should cause static errors. This is a great case for a lint! And indeed this is the idea behind the void_checks lint. It looks for places where you pass anything but null into a void location, and I would encourage teams to enable it. It’s not required for soundness, but passing anything other than null into a void location is still likely to be an accident, which the lint will flag for you.</p><p>Since all of this is grounded in foundational type theory, void plays well with every part of Dart, even in continuations leveraging type inference in the context of a Future&lt;void&gt;:</p><pre>Future&lt;void&gt;().then((x) {<br>  print(x); // error! x has type “void” so you can’t print it!<br>  // This is what we want!<br>});</pre><pre>// and yes, this is an error too:<br>Foo f = await voidFuture();</pre><p>At this point, the average developer probably knows everything they need to know about void in order to effectively use it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/268/0*_2MNvj3It63IUFUH" /></figure><p>If you are still following along, however, there are a few more interesting nuggets.</p><p>Even with void_checks enabled, void locations will not be guaranteed to contain null. Take this override:</p><pre>class A {<br>  void f(Object o) {}<br>}</pre><pre>class B extends A {<br>  @override<br>  Object f(Object o) =&gt; o;<br>}</pre><p>We don’t want to make this override illegal, because it’s safe, useful, and would be a breaking change from Dart 1. And so we are forced to accept that void locations may hold absolutely any value. We also cannot “optimize out” the value that A.f() returns, because at runtime it may be a B!</p><p>Rather, we have the clever option of making void a sister type of Object. After all, it may hold any value, and all values are Objects. This is not something we designed, it’s just reality. Recognizing that reality makes it something we can then leverage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*1ZUU5fNh-kmpPzMU" /></figure><p>By making void a sibling of Object, we leave ourselves no<em> requirements</em> that a void value go <em>completely</em> unused. We try our best to keep void to itself, but we deliberately relax these restrictions in a few places for the sake of backwards compatibility:</p><pre>dynamic f() =&gt; voidFn(); // this is legal<br>voidFn() as dynamic; // this is legal</pre><p>These are special cases that would be legal for an Object, and we made it legal for void, too, in the interest of making Dart 2 a smoother rollout.</p><p>Making void a sibling of Object also means that void can be used as a type parameter without bloating the compiled output (no “template specialization,” for you C++ folk). This reduction is good for keeping web &amp; Flutter apps small, at the expense of allowing the following:</p><pre>&lt;void&gt;[1, 2, 3].toString(); // this is legal and prints [1, 2, 3]</pre><p>And lastly, it may seem useless to ever type a parameter as void, especially since it’s a form of Object. However, void values can be<em> passed to </em>void<em> locations</em>:</p><pre>f(void x) { … }<br>f(voidFn()); // this is legal</pre><p>This is useful for <em>sequencing</em>, which is for instance used by <a href="https://pub.dartlang.org/packages/mockito">Mockito</a> when mocking methods that return void. (Replace f with when in the above code for a closer approximation.)</p><p>In summary:</p><ul><li>The void type is a sibling of Object.</li><li>Almost always, a void object can’t be used.</li><li>Something marked void could be, in practice, absolutely anything.</li><li>Anything can be “thrown away” into a location marked void, and the lint void_checks restricts this behavior.</li><li>A void value can be passed into other void locations.</li></ul><h3>The bottom type</h3><p>Before I get to talking about Null, it’s critical we talk about the “bottom” type.</p><p>This is a naturally occurring type in type theory, which has a short academic definition with a few practical applications.</p><p>If you stop reading this section because <em>it’s so dang weird</em>, that is strong evidence of my original TLDR. Unless you want your code to be similarly dang weird, you probably want void. Now let’s explore this weird rabbit hole and see how far it goes, eh?</p><p>The bottom type is the subtype of all types. Put in simpler object-oriented terms, that means it’s a Person. And a Car. And an Animal. And every other type from every program ever written.</p><p>If this sounds absurd, that’s because it is. I like to think of it as a “placeholder” type. But “absurd” or “imaginary” type would also be a somewhat reasonable name for it. Instead, though, it’s called the <em>bottom</em> type, because it’s the bottom of the type hierarchy, which, in computer science, is upside down. ¯\_(ツ)_/¯. Formally, it may be referred to by the symbol ⊥, which you may also recognize as the symbol for “false.”</p><p>If you try to imagine a value that is a Person <em>and</em> a Car <em>and</em> an Animal, you won’t be able to think of anything. And surprisingly, that is where the practical usage of ⊥ comes from!</p><p>What if I write a function that never returns? There are two easy ways to do so:</p><pre>loopForever() {<br>  while(true); // first way<br>}</pre><pre>alwaysThrow() {<br>  throw Exception(); // second way<br>}</pre><p>What is the best return type for these two functions?</p><p>It depends. Because the function never returns, the return type doesn’t really matter. You can use any type — even the absurd bottom type, which can be used in various ways in various languages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*TkwIX5BsrbSzHfLr" /></figure><p>C++ has this as noreturn. Rust has !, and Scala has Nothing. But my favorite example comes from Haskell, which has a very commonly used undefined function that aborts the program. It returns, you guessed it, the bottom type.</p><p>If we assume an undefined function in Dart like the one in Haskell, which merely throws an exception when called and returns ⊥, then it would look like the following:</p><pre>Foo foo = cond ? val : undefined();</pre><p>In the example usage line, the program can safely run and store val when cond is true. And when cond is false, the program will throw an exception during undefined(). It is safe to “store” the result of undefined() in foo, regardless of the type of foo, because that store will never actually happen!</p><p>undefined()<strong> </strong>here does not return anything. But the lesson here is not that we can make foo empty…it’s that the bottom type is empty like an empty promise. It’s emptier than empty. It just never happens.</p><p>One thing I must be careful to state is that you can and, depending on the usage, often should return void from these functions in practice. Usually code like return loopForever() is more likely to be a mistake than a useful pattern. However, the choice is yours to make.</p><p>The bottom type is also nice for read-only empty lists. In Dart, Lists are covariant, so a List&lt;int&gt; is allowed to be used as a List&lt;Object&gt;. If you then attempt to stick a String inside that List&lt;Object&gt;, a runtime check will catch that for you and throw an error.</p><p>That means that if we make a List of ⊥, there’s nothing we can put into it, but we can treat it as a list of anything:</p><pre>List&lt;int&gt; intList = &lt;⊥&gt;[];<br>  for(int i in intList) {<br>  print(i * 2); // valid, because this simply never happens<br>}</pre><p>There are even more interesting cases when you look at what’s called “contravariant” placement of the bottom type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*OyVAekp1iwSQyfur" /></figure><p>Let’s say we define a function that has a ⊥ parameter:</p><pre>void f(⊥ x) {}</pre><p>This is almost the opposite of the undefined() example. Rather than a function that never returns, we have declared a function that can’t be called! No actual value is assignable to that parameter x. You can’t pass in a Person because it’s <em>not also a </em>Car, and you can’t pass in a Car because it’s not also a Person. The only thing you could pass in is the absurd type itself:</p><pre>f(undefined());</pre><p>But as we just covered before, undefined() never returns, so f() is still never actually called in this case!</p><p>Typing a parameter as ⊥ may seem useless, but it has esoteric value because all functions that <em>can</em> be called are subtypes of functions that <em>can’t</em> be.<em> </em>(Think about it: a function that <em>can</em> be called doesn’t <em>have</em> to be. And if a function is not called, it cannot produce runtime errors.)</p><p>If you’re still with me, take a deep breath and pat yourself on the back.</p><p>Specifically, it’s safe to cast any Function(X) to a Function(⊥), for any X. This is better than using Dart’s all-encompassing Function type, because it’s more specific.</p><p>With this you can, for instance, store any unary function in a field and call it dynamically, to get past static errors and replace them with runtime errors if you made a mistake:</p><pre>Function(⊥) f;<br>f = (int x) =&gt; x + 1;</pre><pre>// the validity of 123 as an argument to f is checked at runtime<br>(f as dynamic)(123);</pre><p>This is a neat trick to help you in a pinch.</p><p>Now we can talk about Null.</p><h3>Null in Dart 2</h3><p>The conceptual “bottom” type (a type which is a subtype of all types) exists in Dart, but that’s not all. Such a value also exists in Dart 2! In Dart we call it Null, and that value is — you guessed it — null.</p><p>Since I can make anything null(/Null), the absurd type is not so absurd in Dart. Which makes it a bit complicated.</p><p>Note: The value null, of course, is not a Car, and it’s not a Person. And we do get requests for non-nullable types in Dart. So if we do make such a change to Dart, we’ll need a new bottom type, likely named something to the effect of Nothing, and it will be a truer bottom type at that.</p><p>Not only does Null have all the same absurd usages as the bottom type, but it also has an escape hatch. If you ever really need to return from a function that can’t return, or call a function that can’t be called, we give you an out! You can pass null in there! It would be, honestly, a bit unfair of us to do otherwise, when you look at the whole picture.</p><p>It does give a whole lot of caveats, though, to an otherwise simple declaration:</p><pre>Null nothing() =&gt; null;</pre><p>Null is the most specific type for foo(), so it’s a logical choice and a good starting place. The analyzer is also kind enough to warn you if you call methods on it that don’t exist:</p><pre>nothing().x; // error! No member x on Null</pre><p>But this may give a false illusion of safety.</p><pre>nothing().toString(); // no error: Null defines toString()<br>Foo foo = nothing(); // no error: foo will become null</pre><pre>// Acceptable for all parameter types in f(x),<br>// runtime errors if f(x) expects non-null<br>f(nothing());</pre><p>If your goal is for nothing() to be a synonym for null, then this would be the behavior you want, and Null is the correct type for your function that returns null.</p><p>There were good reasons for suggesting Future&lt;Null&gt;, and it worked while we were coming up with the new void semantics. However, it has the same holes:</p><pre>(await futureNull()).toString(); // no error!<br>Foo foo = await futureNull(); // no error!</pre><p>Essentially, by making some function f() return a Future&lt;Null&gt;, you are making await f() a synonym of null in your program! That’s dangerous because you can use null as if it were absolutely anything, absolutely any type. I don’t think that’s what most people want.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*4NDBhLva40BBuX0f" /></figure><p>Why else might you use Future&lt;Null&gt; instead of Future&lt;void&gt;? It all goes back to that mind-boggling bottom type. You might consider Future&lt;Null&gt; for futures that must be awaitable but that never complete, or that always complete with an error. This is directly comparable to why a function would return Null.</p><p>The same logic applies to Stream&lt;Null&gt;: Use this for a Stream that never sends any events. This is directly comparable to why a read-only empty list may be typed as List&lt;Null&gt;.</p><p>Some trickier types to provide a guideline for are StreamController&lt;Null&gt; and Sink&lt;Null&gt;. These are comparable to functions. The most sound reason to use these types is to say that they should never be used. The next most sound is that you would like them to accept only synonyms of Null, which is reasonable only if you don’t have void_checks turned on.</p><p>Imagine that Dart did not have null as an escape hatch for all values. Would you want to make a type Sink&lt;⊥&gt; that can only accept events from a Stream&lt;⊥&gt;, which itself never broadcasts an event? If the answer is yes, then go for it and make a Sink&lt;Null&gt;.</p><p>All of these usages have weak guarantees because the value null itself is an escape hatch for why you otherwise would be most likely to use the Null type itself. However, do not make the mistake of thinking that the <em>value</em> is the escape hatch itself, rather than the bunker. One is safe and sturdy and the other is to save you the effort of digging upwards through reinforced concrete when the bunker catches on fire with you in it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*yepcr98D1YlpsRJF" /></figure><p>In summary, here are the main uses of typing something as Null:</p><ul><li>As a synonym for null, usable everywhere as everything</li><li>As a placeholder for execution your program will never reach</li><li>As a container that must stay empty so that it can masquerade as any type</li><li>As an output with no inputs</li></ul><h3>Final comparison</h3><p><em>If you reached this point of the article, you deserve some sort of recompense — reach out to me and I’ll see about buying you a beer next time you’re free in Portland OR. :)</em></p><p>I talked a lot about the bottom type, but I didn’t get into its opposite at all, Top. The top type is, as you would expect, the polar opposite of the bottom type. And while Dart’s name for the bottom type is Null, Dart’s name for the top type is one of dynamic, Object, and void (three heads of the same coin).</p><p>It may seem strange that words like “nothing” and “empty” in English can mean two such dissimilar things in type theory. Both are suitable descriptions of the exact opposite top and bottom types, and therefore, of Null and void. It may seem strange that two opposite types are appealing candidates for the same job! It may seem frustrating that Dart has so many weird quirks and edge cases, now that you’re reading up on which to use.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*ybPT9jlu0yGAnu2v" /></figure><p>Our mistake, I think, was in ever recommending Null to be used like void in the first place. It would at the time have been a disservice to users to withhold what was useful advice, given Dart 1 semantics. But we accidentally made a <em>very</em> esoteric type <em>very</em> commonly used.</p><p>Well you’ve read the article now. What do you think? Do you expect to come across a valid use for Null any time soon? Do you have a firm understanding of where it’s useful?</p><p>And more importantly, can you help us spread the good news that void is here to make it all simpler?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84a42d616e7d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dartlang/future-void-vs-future-null-whats-the-difference-84a42d616e7d">Future&lt;void&gt; vs Future&lt;Null&gt;, what’s the difference?</a> was originally published in <a href="https://medium.com/dartlang">Dart</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Announcement: IDE Tooling for AngularDart 5]]></title>
            <link>https://medium.com/dartlang/announcement-ide-tooling-for-angulardart-5-de01ecccec9d?source=rss-c9094de7d9b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/de01ecccec9d</guid>
            <category><![CDATA[angulardart]]></category>
            <category><![CDATA[dartlang]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[intellij]]></category>
            <category><![CDATA[dart]]></category>
            <dc:creator><![CDATA[Mike Fairhurst]]></dc:creator>
            <pubDate>Tue, 27 Mar 2018 16:28:38 GMT</pubDate>
            <atom:updated>2018-04-17T15:51:42.496Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*ZrNw6Wd0ZqQibsfXS8Gsng.png" /></figure><p>Dart is a statically typed language which we know and love, and Dart 2 will be even more strictly typed. That is why it makes such a great platform for the Angular framework, where components are mostly statically linked together in templates to create performant UIs.</p><p>So, to further improve this productive and safe developer experience, we are announcing new IDE tools for preserving that type-safety inside your templates! It supports AngularDart 5, and works out of the box with IntelliJ/WebStorm. It can also be configured to work in VSCode, vim, and more.</p><p>You can skip straight to <a href="#a8cb">setup</a> now if you’re already sold, or follow along for a tour of what our new IDE integration offers you!</p><h3>Errors</h3><p>The new analysis plugin will find many type errors inside your templates for you. Expressions are validated against the directives you use, the inputs they contain, and the references you bind (#foo, let item of, …).</p><p>Here’s a misspelled member, so you don’t have to play human-spellchecker!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/0*Ia1RMoPF9nmaAsIJ." /></figure><p>And mismatched types on a component input are no longer a problem either.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/0*LJKT0LftQFRjuKaN." /></figure><p>We can also give you errors related to $event variable types,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/0*4UKHl3KVHtpV6Ysx." /></figure><p>And we check the content you transclude inside your directives. This is one example of where we catch not only type errors but also dead code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/0*2nWPvm2BGmt1SGMZ." /></figure><p>And we could go on! We catch a slew of other types of errors, both in templates, and component definitions.</p><p>In addition to being highlighted in your editor, the full listing of errors is displayed in the Dart Analysis panel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u34uyVu2qy_7p1xfxHFnCA.png" /></figure><h3>Autocomplete</h3><p>We didn’t just stop at validation! While much of the work was getting our analysis to be performant and fully well-behaved in regards to the compiler, much of the value comes from using that resolved template state to deliver you the goodness of regular Dart autocompletion in your templates:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*Qh5P6t4ccwezdMLWjAWw9Q.png" /></figure><p>But we can complete more than regular Dart members — how about inputs, outputs, and HTML tags?</p><p>Tags? Check.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/441/1*d3wuZHY5Ja52fe00u2jgSQ.png" /></figure><p>Attributes? Check.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*UlT5D-O_rajaFS_MCyHWsA.png" /></figure><p>Stars? Check.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*3QMba2E4BETXmoi-5bG6gQ.png" /></figure><p>Attributes within stars? Check.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/417/1*Ep9sEzWfe9Kife8HyMjvKw.png" /></figure><p>Bonus points: Suggested tags <em>with</em> attributes within component transclusions!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*_8_-jlg2S62p_a8plKAtgg.png" /></figure><p><em>Transclusions are a famously advanced topic within angular, so if you think you know what exactly it is that we’re suggesting, pat yourself on the back for knowing AngularDart very well.</em></p><p>Suffice it to say, component APIs are much easier to follow when using our plugin!</p><h3>Navigation</h3><p>Support here varies a lot more by editor, but within IntelliJ you can click through parts of Dart expressions. In other editors you may be able to navigate on even more entities such as tags and inputs/outputs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/409/1*ceQlGeSCVnfOJqtHEITljQ.png" /></figure><h3>How To Use</h3><p>Make sure you are using an AngularDart 5 beta release, and Dart 2.0.0-dev.31 or newer.</p><p>Simply add this to your <a href="https://www.dartlang.org/guides/language/analysis-options#the-analysis-options-file">analysis_options.yaml</a> file:</p><pre>analyzer:<br>  plugins:<br>    - angular</pre><p>And restart your IDE. Note, it may take a few seconds to spin up the plugin. It will first have to download sources &amp; dependencies for you, and the first analysis will be slower than subsequent ones.</p><p>You can also play around with it in our <a href="https://github.com/MichaelRFairhurst/dartconf-angular-plugin-lightning-demo">analyzer plugin demo project</a>.</p><p>If you are using IntelliJ, this should be all you have to do. For other editors, they may not run our plugin on HTML without extra work — for instance, VSCode requires <a href="https://github.com/Dart-Code/Dart-Code/issues/396#issuecomment-366058798">a flag</a>.</p><h3>Feedback &amp; More</h3><p>Our plugins source code lives <a href="https://github.com/dart-lang/angular_analyzer_plugin">on Github</a>, which has more information on what’s supported and where you can file issues if you have questions or come across any bugs.</p><p>The new IDE tooling will be part of the next stable release of AngularDart (v5). We’re very excited to offer you even better productivity as you write your Angular web apps!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de01ecccec9d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dartlang/announcement-ide-tooling-for-angulardart-5-de01ecccec9d">Announcement: IDE Tooling for AngularDart 5</a> was originally published in <a href="https://medium.com/dartlang">Dart</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>