<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Anthony Ciccarello</title>
    <description>The latest articles on DEV Community by Anthony Ciccarello (@ajciccarello).</description>
    <link>https://dev.to/ajciccarello</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F66753%2Fc30e8932-5c64-4aae-a2b4-4240d69b1162.jpg</url>
      <title>DEV Community: Anthony Ciccarello</title>
      <link>https://dev.to/ajciccarello</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ajciccarello"/>
    <language>en</language>
    <item>
      <title>Multi-engine site search</title>
      <dc:creator>Anthony Ciccarello</dc:creator>
      <pubDate>Tue, 04 Jul 2023 08:52:26 +0000</pubDate>
      <link>https://dev.to/ajciccarello/multi-engine-site-search-1ege</link>
      <guid>https://dev.to/ajciccarello/multi-engine-site-search-1ege</guid>
      <description>&lt;p&gt;I added the &lt;a href="https://www.ciccarello.me/search/"&gt;/search&lt;/a&gt; page to my site with a form supporting multiple search engines. The hope is to give visitors a bit more choice in what companies to interact with.&lt;/p&gt;

&lt;p&gt;The challenge was managing different query param for different sites.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DuckDuckGo doesn't support multiple &lt;code&gt;q=&lt;/code&gt; params, but does accept &lt;code&gt;sites=&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Ecosia doesn't support a &lt;code&gt;sites=&lt;/code&gt; param but does support multiple &lt;code&gt;q=&lt;/code&gt; params (albeit with an extra comma requiring a space)&lt;/li&gt;
&lt;li&gt;Google does support a &lt;code&gt;as_sitesearch=&lt;/code&gt; param but that was dropped with the addition of another &lt;code&gt;q=&lt;/code&gt; param.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By adding several different hidden form fields, I was able to cover each engine (almost) seamlessly.&lt;br&gt;
Then the only difference was the form action would could be defined on the button.&lt;br&gt;
The final result is as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"search"&lt;/span&gt; &lt;span class="na"&gt;method=&lt;/span&gt;&lt;span class="s"&gt;"get"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"hidden"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"sites"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"ciccarello.me"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"hidden"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"q"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"site:ciccarello.me "&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"q"&lt;/span&gt; &lt;span class="na"&gt;placeholder=&lt;/span&gt;&lt;span class="s"&gt;"Search"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt; &lt;span class="na"&gt;formaction=&lt;/span&gt;&lt;span class="s"&gt;"https://ecosia.com/search"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Search with Ecosia&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt; &lt;span class="na"&gt;formaction=&lt;/span&gt;&lt;span class="s"&gt;"https://www.google.com/search"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Search with Google&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt; &lt;span class="na"&gt;formaction=&lt;/span&gt;&lt;span class="s"&gt;"https://duckduckgo.com/"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Search with DuckDuckGo&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>search</category>
      <category>html</category>
    </item>
    <item>
      <title>Why I Got a Twitter Account</title>
      <dc:creator>Anthony Ciccarello</dc:creator>
      <pubDate>Fri, 31 Jan 2020 01:55:48 +0000</pubDate>
      <link>https://dev.to/ajciccarello/why-i-got-a-twitter-account-4g6</link>
      <guid>https://dev.to/ajciccarello/why-i-got-a-twitter-account-4g6</guid>
      <description>&lt;p&gt;My friends and family often ask me about my Twitter account which is&lt;br&gt;
frequently filled with web development specific comments like this:&lt;/p&gt;


&lt;blockquote class="ltag__twitter-tweet"&gt;

  &lt;div class="ltag__twitter-tweet__main"&gt;
    &lt;div class="ltag__twitter-tweet__header"&gt;
      &lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--ApcsEXGt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/profile_images/957835456900575232/x3d40SL6_normal.jpg" alt="Anthony Ciccarello profile image"&gt;
      &lt;div class="ltag__twitter-tweet__full-name"&gt;
        Anthony Ciccarello
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__username"&gt;
        &lt;a class="comment-mentioned-user" href="https://dev.to/ajciccarello"&gt;@ajciccarello&lt;/a&gt;

      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__twitter-logo"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P4t6ys1m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-f95605061196010f91e64806688390eb1a4dbc9e913682e043eb8b1e06ca484f.svg" alt="twitter logo"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__body"&gt;
      I never cease to be impressed with the number of &lt;a href="https://twitter.com/npmjs"&gt;@npmjs&lt;/a&gt; packages &lt;a href="https://twitter.com/sindresorhus"&gt;@sindresorhus&lt;/a&gt; authors. Appearing in 5 of the 20 search results I see.
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__date"&gt;
      17:49 PM - 29 Jun 2017
    &lt;/div&gt;


    &lt;div class="ltag__twitter-tweet__actions"&gt;
      &lt;a href="https://twitter.com/intent/tweet?in_reply_to=880483311637934081" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-reply-action.svg" alt="Twitter reply action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/retweet?tweet_id=880483311637934081" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-retweet-action.svg" alt="Twitter retweet action"&gt;
      &lt;/a&gt;
      0
      &lt;a href="https://twitter.com/intent/like?tweet_id=880483311637934081" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-like-action.svg" alt="Twitter like action"&gt;
      &lt;/a&gt;
      0
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;


&lt;p&gt;For the majority of people who are not familiar with &lt;a href="https://www.npmjs.com"&gt;npm&lt;/a&gt; or the work of &lt;a href="https://sindresorhus.com"&gt;Sindre Sorhus&lt;/a&gt;, don't worry. You are not expected to get it. Tweets like this are not directed at the general public but rather at a specific software developer who has done a lot of work for the JavaScript community. While Twitter is a vast community, it was the chatter of unique communities within the Twitterverse that ultimately pulled me in.&lt;/p&gt;




&lt;p&gt;For many years I didn't see the point of Twitter. Facebook had done a good job of adding features to make Twitter technically unnecessary. Facebook allows public posts and allows you to &lt;a href="https://www.facebook.com/help/follow/"&gt;follow&lt;/a&gt; people without friending them. So from my perspective, if I wanted to let the world what I was &lt;a href="https://twitter.com/hashtag/Lunch"&gt;eating for lunch&lt;/a&gt; I could just post it on Facebook. But social groups have different cultures and Facebook had already developed a reputation for close-knit private sharing.&lt;/p&gt;

&lt;p&gt;Meanwhile, the more I dove into front-end web development, the more references I saw to conversations on Twitter by high-profile developers. Blog posts frequently referred to recommendations or controversies that were being discussed 140 characters at a time. It was this active community of developers sharing ideas in an informal medium that really intrigued me.&lt;/p&gt;

&lt;p&gt;So I created an account. At first, I just followed other people. It was really interesting to see the topics that other software developers were discussing. At the time I was the only frontend developers on my team and wasn't connected with people who were trying out technologies like &lt;a href="https://webpack.js.org"&gt;Webpack&lt;/a&gt;, so hearing the experiences of other developers was valuable to me.&lt;/p&gt;


&lt;blockquote class="ltag__twitter-tweet"&gt;

  &lt;div class="ltag__twitter-tweet__main"&gt;
    &lt;div class="ltag__twitter-tweet__header"&gt;
      &lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--1M-657o0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/profile_images/759557613445001216/6M2E1l4q_normal.jpg" alt="Kent C. Dodds 🧢 profile image"&gt;
      &lt;div class="ltag__twitter-tweet__full-name"&gt;
        Kent C. Dodds 🧢
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__username"&gt;
        &lt;a class="comment-mentioned-user" href="https://dev.to/kentcdodds"&gt;@kentcdodds&lt;/a&gt;

      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__twitter-logo"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P4t6ys1m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-f95605061196010f91e64806688390eb1a4dbc9e913682e043eb8b1e06ca484f.svg" alt="twitter logo"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__body"&gt;
      &lt;a href="https://twitter.com/arahansen"&gt;@arahansen&lt;/a&gt; I have no need of gulp plugins. Everything I do is with webpack. I just fire it off with npm scripts.
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__date"&gt;
      19:11 PM - 17 Dec 2015
    &lt;/div&gt;


    &lt;div class="ltag__twitter-tweet__actions"&gt;
      &lt;a href="https://twitter.com/intent/tweet?in_reply_to=677566822133071874" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-reply-action.svg" alt="Twitter reply action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/retweet?tweet_id=677566822133071874" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-retweet-action.svg" alt="Twitter retweet action"&gt;
      &lt;/a&gt;
      0
      &lt;a href="https://twitter.com/intent/like?tweet_id=677566822133071874" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-like-action.svg" alt="Twitter like action"&gt;
      &lt;/a&gt;
      0
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;


&lt;p&gt;As time went on, I became more comfortable and started engaging more with the platform. Attending &lt;a href="https://www.ng-conf.org/"&gt;ng-conf&lt;/a&gt; was a turning point for me because almost all of the speakers were using their Twitter account as their public profile. I began to see more how the platform provided an opportunity to engage with leaders in the community.&lt;/p&gt;


&lt;blockquote class="ltag__twitter-tweet"&gt;

  &lt;div class="ltag__twitter-tweet__main"&gt;
    &lt;div class="ltag__twitter-tweet__header"&gt;
      &lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--ApcsEXGt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/profile_images/957835456900575232/x3d40SL6_normal.jpg" alt="Anthony Ciccarello profile image"&gt;
      &lt;div class="ltag__twitter-tweet__full-name"&gt;
        Anthony Ciccarello
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__username"&gt;
        &lt;a class="comment-mentioned-user" href="https://dev.to/ajciccarello"&gt;@ajciccarello&lt;/a&gt;

      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__twitter-logo"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P4t6ys1m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-f95605061196010f91e64806688390eb1a4dbc9e913682e043eb8b1e06ca484f.svg" alt="twitter logo"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__body"&gt;
      Impressed with the &lt;a href="https://twitter.com/code"&gt;@code&lt;/a&gt; snippets shown at &lt;a href="https://twitter.com/hashtag/ngconf"&gt;#ngconf&lt;/a&gt; . Nice work &lt;a href="https://twitter.com/John_Papa"&gt;@John_Papa&lt;/a&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__date"&gt;
      17:11 PM - 04 May 2016
    &lt;/div&gt;


    &lt;div class="ltag__twitter-tweet__actions"&gt;
      &lt;a href="https://twitter.com/intent/tweet?in_reply_to=727908615122620417" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-reply-action.svg" alt="Twitter reply action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/retweet?tweet_id=727908615122620417" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-retweet-action.svg" alt="Twitter retweet action"&gt;
      &lt;/a&gt;
      0
      &lt;a href="https://twitter.com/intent/like?tweet_id=727908615122620417" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-like-action.svg" alt="Twitter like action"&gt;
      &lt;/a&gt;
      1
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;


&lt;p&gt;Following ng-conf I started connecting more with developers through Twitter. Sometimes it was simply re-tweeting a post I thought deserved more attention (even if I signaled Twitter's algorithms more than the few followers I had). But other times I asked questions of people in the web development community I would not have normally contacted. In this way Twitter has opened up a world of professional advice and information.&lt;/p&gt;

&lt;p&gt;Since joining Twitter, I've expanded my use to include sharing interesting links or sending feedback to the public relations employees of companies I've interacted with. However, I still see Twitter as a professional tool. It offers the opportunity to glean from software developers who care about improving the web platform. These individuals fill a mentorship role that isn't always readily available within work organizations and provide an outside perspective that has helped me make decisions at work.&lt;/p&gt;

&lt;p&gt;Twitter is a great way to tap into public conversations. Occasionally I add my voice but there are a lot of conversations going on that don't matter to me. As a web developer, I have found a niche where I feel comfortable. In this space, Twitter has become a great resource to learn more about industry standards and where the software community is headed. So while many might be confused by what I share, I want to continue to engage with the part of Twitter that has helped me to grow as a software engineer.&lt;/p&gt;


&lt;blockquote class="ltag__twitter-tweet"&gt;

  &lt;div class="ltag__twitter-tweet__main"&gt;
    &lt;div class="ltag__twitter-tweet__header"&gt;
      &lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--6lJ9h2vQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/profile_images/1117445887335096320/4NHfCPH2_normal.jpg" alt="Daniel Ehrenberg profile image"&gt;
      &lt;div class="ltag__twitter-tweet__full-name"&gt;
        Daniel Ehrenberg
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__username"&gt;
        @littledan
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__twitter-logo"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P4t6ys1m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-f95605061196010f91e64806688390eb1a4dbc9e913682e043eb8b1e06ca484f.svg" alt="twitter logo"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__body"&gt;
      TC39 is recommending that JS programmers use semicolons at the end of statements in code, rather than relying on ASI.&lt;br&gt;&lt;a href="https://t.co/9FY4i29iqs"&gt;github.com/tc39/ecma262/p…&lt;/a&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__date"&gt;
      18:38 PM - 11 Jan 2018
    &lt;/div&gt;


    &lt;div class="ltag__twitter-tweet__actions"&gt;
      &lt;a href="https://twitter.com/intent/tweet?in_reply_to=951523844262637568" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-reply-action.svg" alt="Twitter reply action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/retweet?tweet_id=951523844262637568" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-retweet-action.svg" alt="Twitter retweet action"&gt;
      &lt;/a&gt;
      339
      &lt;a href="https://twitter.com/intent/like?tweet_id=951523844262637568" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-like-action.svg" alt="Twitter like action"&gt;
      &lt;/a&gt;
      606
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;





&lt;p&gt;&lt;em&gt;Cover Image: Scrub Jay - Photo by &lt;a href="https://unsplash.com/photos/WAxRivz5VtM?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Ken Goulding&lt;/a&gt; on &lt;a href="https://unsplash.com/?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Originally published &lt;a href="https://www.ciccarello.me/blog/2018/01/29/why-i-got-a-twitter-account/"&gt;Jan 29, 2018&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>twitter</category>
    </item>
    <item>
      <title>Migrating an Angular 1 application to @types</title>
      <dc:creator>Anthony Ciccarello</dc:creator>
      <pubDate>Wed, 29 Jan 2020 04:51:56 +0000</pubDate>
      <link>https://dev.to/ajciccarello/migrating-an-angular-1-application-to-types-3mk5</link>
      <guid>https://dev.to/ajciccarello/migrating-an-angular-1-application-to-types-3mk5</guid>
      <description>&lt;p&gt;I upgraded an application at work to use @types instead of Typings today.&lt;br&gt;
Unfortunately I had trouble finding information on the differences between the&lt;br&gt;
two systems. Many things that were supposed to " &lt;a href="https://github.com/DefinitelyTyped/DefinitelyTyped/issues/10154#issuecomment-233519904"&gt;work with no&lt;br&gt;
change&lt;/a&gt;"&lt;br&gt;
didn't seem to be but eventually I was able to please the TypeScript compiler.&lt;br&gt;
Since information online seemed to be lacking I thought I'd jot down a few&lt;br&gt;
quick notes on what I learned.&lt;/p&gt;
&lt;h4&gt;
  
  
  Global types are only types (not the global object)
&lt;/h4&gt;

&lt;p&gt;After installing the angular types, all of my references to the global angular&lt;br&gt;
object started throwing compilation errors. This confounded me because all of&lt;br&gt;
the information I read said that global types should still work. Additionally&lt;br&gt;
I was still able to use types like &lt;code&gt;angular.IScope&lt;/code&gt; without any issues. What I&lt;br&gt;
didn't realize was that the @types definitions did not include the global&lt;br&gt;
object. To be able to use &lt;code&gt;angular.module(...)&lt;/code&gt; or &lt;code&gt;angular.copy(...)&lt;/code&gt; in my&lt;br&gt;
ES2015 modules I needed to import angular into the file using the following&lt;br&gt;
syntax.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import * as angular from 'angular';
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h4&gt;
  
  
  Libraries can mess with the global types
&lt;/h4&gt;

&lt;p&gt;Our project is using a library called &lt;a href="https://github.com/ngParty&amp;lt;br&amp;gt;%0A/ng-metadata"&gt;ng-metadata&lt;/a&gt; to allow writing our Angular 1 application in a style in line&lt;br&gt;
with Angular 2. This has made our development much easier. Because the project&lt;br&gt;
depended on the Angular 1 typings, the type definitions from @types conflicted&lt;br&gt;
with the library. Thankfully, ng-metadata had already&lt;br&gt;
&lt;a href="https://github.com/ngParty/ng-&amp;lt;br&amp;gt;%0Ametadata/commit/3eb047d6456ba12134d48701a212334ad8b81b7e"&gt;fixed&lt;/a&gt; the issue, however I&lt;br&gt;
didn't realize that some of the compilation errors were due to the library. It&lt;br&gt;
wasn't until I updated ng-metadata that 3/4 of the compilation errors went&lt;br&gt;
away.&lt;/p&gt;
&lt;h4&gt;
  
  
  You should use imports instead of global types
&lt;/h4&gt;

&lt;p&gt;Something I learned while migrating was that you don't need to use the global&lt;br&gt;
types. In fact I would recommend importing your types to shorten how many&lt;br&gt;
characters it takes to define variables and to clarify where the types are&lt;br&gt;
coming from. This was apparently supported using Typings but I learn it while&lt;br&gt;
I was trying to fix some of the compilation errors I was seeing.&lt;/p&gt;

&lt;p&gt;Instead of using the global typings&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;$httpBackend&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;angular&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;IHttpBackendService&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;$state&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;angular&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;IStateService&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Import the types at the beginning of the file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;IHttpBackendService&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;angular&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;IStateService&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;angular-ui-router&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;$httpBackend&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;IHttpBackendService&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;$state&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;IStateService&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;While this pattern does add more imports at the beginning of your files, it is&lt;br&gt;
clear where the types are being defined.&lt;/p&gt;




&lt;p&gt;I hope others are able to have an easier time migrating to the new @types&lt;br&gt;
system. It seems like a great way to simplify type management (especially for&lt;br&gt;
libraries) but the migration was not as painless as I would have hoped.&lt;br&gt;
Projects starting with @types shouldn't encounter the issues that I have since&lt;br&gt;
the compiler won't let them go down a path that the raw DefinitelyTyped&lt;br&gt;
definitions let us go. But for those who want to migrate, give yourself some&lt;br&gt;
time to sort out the kinks.&lt;/p&gt;




&lt;p&gt;_Originally published &lt;a href="https://www.ciccarello.me/blog/2016/11/16/migrating-angular-1-to-types/"&gt;Nov 16, 2016&lt;/a&gt;&lt;/p&gt;

</description>
      <category>angular</category>
    </item>
    <item>
      <title>Automate Mojave Dark mode configuration</title>
      <dc:creator>Anthony Ciccarello</dc:creator>
      <pubDate>Wed, 29 Jan 2020 04:45:13 +0000</pubDate>
      <link>https://dev.to/ajciccarello/automate-mojave-dark-mode-configuration-1lhd</link>
      <guid>https://dev.to/ajciccarello/automate-mojave-dark-mode-configuration-1lhd</guid>
      <description>&lt;p&gt;If you like to &lt;a href="https://kalis.me/dotfiles-automating-macos-system-configuration/"&gt;automate your macOS configuration&lt;/a&gt; via bash scripts and have recently&lt;br&gt;
setup Mojave, you may be wondering how to enable dark mode, the configuration&lt;br&gt;
is called "AppleInterfaceStyle" and can be set using the following command.&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;defaults write "Apple Global Domain" "AppleInterfaceStyle" "Dark"
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If you would like to revert back to the default (light) theme, delete the key.&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;defaults delete "Apple Global Domain" "AppleInterfaceStyle"
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Both enabling and disabling will require a restart of your computer to take&lt;br&gt;
affect. If you would like to try out the theme immediately, open the General&lt;br&gt;
tab of the mac preferences.&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;open /System/Library/PreferencePanes/Appearance.prefPane
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;p&gt;&lt;em&gt;Originally published &lt;a href="https://www.ciccarello.me/blog/2018/09/25/automate-mojave-dark-mode-configuration/"&gt;Sep 25, 2018&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>macos</category>
    </item>
  </channel>
</rss>
