<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using typing utility versus npm install @types in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Using-typing-utility-versus-npm-install-types/m-p/159162#M33</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/2834"&gt;@TedPattison&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your feedback.&lt;/P&gt;&lt;P&gt;The powerbi-visuals-tools (PBIVIZ) &amp;lt;1.5.0 doesn't support&amp;nbsp;@types packages due to using TypeScript 1.8.x.&lt;/P&gt;&lt;P&gt;We've have updated TypeScript version in PBIVIZ tools and it's 2.1.6 now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In other words, there's no risk to use&amp;nbsp;@types with the latest version of PBIVIZ tools.&lt;/P&gt;&lt;P&gt;We've already been using &lt;A href="https://github.com/Microsoft/PowerBI-visuals-ChicletSlicer/blob/master/package.json#L23" target="_blank"&gt;@types&lt;/A&gt;&amp;nbsp;since PBIVIZ 1.5.0 release. We're going to update our documentation soon.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Ignat Vilesov&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;Software Engineer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 14 Apr 2017 14:59:32 GMT</pubDate>
    <dc:creator>v-viig</dc:creator>
    <dc:date>2017-04-14T14:59:32Z</dc:date>
    <item>
      <title>Using typing utility versus npm install @types</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Using-typing-utility-versus-npm-install-types/m-p/149067#M10</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I just wanted to gather some feedback from the team and from any other devs who would like to respond.&amp;nbsp;All the Microsoft documentation and samples about adding D3 typed definition files to a custom visual project use the &lt;STRONG&gt;typings&amp;nbsp;&lt;/STRONG&gt;utility. Here is what the instructions are on the Power BI Visuals repo in GitHub:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# First,&amp;nbsp;install D3 v3.5.5 because Power BI does not yet support D3 v4&lt;BR /&gt;&lt;STRONG&gt;npm install d3@3.5.5 --save&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# Next, install typings utility&lt;BR /&gt;&lt;STRONG&gt;npm install typings -g&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# Next, install typings files for D3&lt;BR /&gt;&lt;STRONG&gt;typings install --save --global dt~d3&amp;nbsp;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#ff0000"&gt;&amp;lt;- Error as it attempts install D3 v4 typings file&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# In the GitHub issues list for the repo, I found that workaround that&amp;nbsp;works&lt;BR /&gt;&lt;STRONG&gt;typings install --save --global dt~d3#0.0.0+20160907005744&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While the &lt;STRONG&gt;typings&lt;/STRONG&gt; utility works these days, looking forward it seems like this utility is being phased out in general node.js and npm development and developers are now standardizing on using the regular &lt;STRONG&gt;npm install&lt;/STRONG&gt; command to install typed definition files from the Definitely Typed project.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here the steps that I am using to create a new custom visual project with support for D3 programming.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;pbiviz new barchart&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;cd barchart&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;npm install d3@3 --save&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;npm install @types/d3@3 --save&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once you have one that,&amp;nbsp;modify the &lt;STRONG&gt;externalJS&lt;/STRONG&gt; setting in &lt;STRONG&gt;pbiviz.json&lt;/STRONG&gt; file&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"externalJS": [&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; "node_modules/d3/d3.js"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then update the&amp;nbsp;&lt;STRONG&gt;files&lt;/STRONG&gt; section of the &lt;STRONG&gt;tsconfig.json&lt;/STRONG&gt; file.&lt;BR /&gt;&lt;STRONG&gt;"files": [&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ".api/v1.5.0/PowerBI-visuals.d.ts",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "src/visual.ts",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "node_modules/@types/d3/index.d.ts"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It use to take me a while to configure all this and now it takes less than a minute. I am able to also add any other JS library and the PowerBI utility libraries for things like formatting in the same fashion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So here are my two questions for everyone.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Has anyone else tried moving away from the typings utility?&lt;/LI&gt;&lt;LI&gt;Does anyone see any potential problems&amp;nbsp;with me using (&lt;EM&gt;and telling others to use&lt;/EM&gt;) the &lt;STRONG&gt;npm install&amp;nbsp;@types&lt;/STRONG&gt; approach instead of using the typings utility?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Thanks for any feedback you can provide.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ted&lt;/P&gt;</description>
      <pubDate>Sun, 26 Mar 2017 13:12:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Using-typing-utility-versus-npm-install-types/m-p/149067#M10</guid>
      <dc:creator>TedPattison</dc:creator>
      <dc:date>2017-03-26T13:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using typing utility versus npm install @types</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Using-typing-utility-versus-npm-install-types/m-p/159162#M33</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/2834"&gt;@TedPattison&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your feedback.&lt;/P&gt;&lt;P&gt;The powerbi-visuals-tools (PBIVIZ) &amp;lt;1.5.0 doesn't support&amp;nbsp;@types packages due to using TypeScript 1.8.x.&lt;/P&gt;&lt;P&gt;We've have updated TypeScript version in PBIVIZ tools and it's 2.1.6 now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In other words, there's no risk to use&amp;nbsp;@types with the latest version of PBIVIZ tools.&lt;/P&gt;&lt;P&gt;We've already been using &lt;A href="https://github.com/Microsoft/PowerBI-visuals-ChicletSlicer/blob/master/package.json#L23" target="_blank"&gt;@types&lt;/A&gt;&amp;nbsp;since PBIVIZ 1.5.0 release. We're going to update our documentation soon.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Ignat Vilesov&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;Software Engineer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 14:59:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Using-typing-utility-versus-npm-install-types/m-p/159162#M33</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2017-04-14T14:59:32Z</dc:date>
    </item>
  </channel>
</rss>

