<?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: ryo</title>
    <description>The latest articles on DEV Community by ryo (@kawamataryo).</description>
    <link>https://dev.to/kawamataryo</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%2F418394%2F9692c30a-d6eb-445c-910f-ee49040dc43e.png</url>
      <title>DEV Community: ryo</title>
      <link>https://dev.to/kawamataryo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kawamataryo"/>
    <language>en</language>
    <item>
      <title>For all developer who want to use TypeScript with "strict: true"</title>
      <dc:creator>ryo</dc:creator>
      <pubDate>Fri, 06 May 2022 02:04:25 +0000</pubDate>
      <link>https://dev.to/kawamataryo/for-all-developer-who-want-to-use-typescript-with-strict-true-40bn</link>
      <guid>https://dev.to/kawamataryo/for-all-developer-who-want-to-use-typescript-with-strict-true-40bn</guid>
      <description>&lt;p&gt;Hi, I have created a cli tool that automatically adds &lt;code&gt;@ts-expect-error&lt;/code&gt; to code with TypeScript type errors.&lt;br&gt;&lt;br&gt;
In this article, I will explain how to use this tool.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/suppress-ts-errors"&gt;https://www.npmjs.com/package/suppress-ts-errors&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  How to use
&lt;/h2&gt;

&lt;p&gt;Just run the command in a project with &lt;code&gt;tsconfig.json&lt;/code&gt;.&lt;br&gt;
If you are using loose type checking, edit tsconfig.json to tighten type checking(e.g &lt;code&gt;strict: true&lt;/code&gt;)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;npx suppress-ts-errors
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This alone will add a &lt;code&gt;@ts-expect-errors&lt;/code&gt; comment to the location in that TypeScript project where there are type errors, and suppress the occurrence of type errors.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Wrs5UY66--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://user-images.githubusercontent.com/11070996/166135217-82e23b1e-7c9f-40c3-88ad-985b021b842a.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Wrs5UY66--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://user-images.githubusercontent.com/11070996/166135217-82e23b1e-7c9f-40c3-88ad-985b021b842a.gif" width="880" height="348"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Of course, the &lt;code&gt;tsx&lt;/code&gt; code will be added in a comment format in line with &lt;code&gt;tsx&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In addition, the &lt;code&gt;vue&lt;/code&gt; subcommand can be used to target type errors in the  portion of Vue's SFC.&lt;br&gt;

&lt;/p&gt;&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;npx suppress-ts-errors vue &lt;span class="s2"&gt;"./src/**/*.vue"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;

&lt;p&gt;This option also allows for flexible settings.&lt;/p&gt;

&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;option&lt;/th&gt;
&lt;th&gt;default&lt;/th&gt;
&lt;th&gt;description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;-t, --tsconfig-path&lt;/td&gt;
&lt;td&gt;&lt;code&gt;./tsconfig.json&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Path to tsconfig.json.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;-c, --comment-type&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Choice of inserted comment type. &lt;br&gt; &lt;code&gt;1&lt;/code&gt; is &lt;a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-9.html#-ts-expect-error-comments"&gt;@ts-expect-error&lt;/a&gt;, &lt;code&gt;2&lt;/code&gt; is &lt;a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-6.html#suppress-errors-in-ts-files-using--ts-ignore-comments"&gt;@ts-ignore&lt;/a&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;-e, --error-code&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Add error code to comment. e.g. TS2345.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;
  
  
  Why I needed it
&lt;/h2&gt;

&lt;p&gt;I am currently working on a project where type checking has not been tightened (cannot set &lt;code&gt;strict: true&lt;/code&gt;), and I would like to improve the situation.&lt;/p&gt;

&lt;p&gt;Generally, I think it is "fix all existing type errors and then make type checking stricter," but my current project was originally written in JavaScript and then migrated to TypeScript, so there were too many existing errors, and it would have required a lot of man-hours to resolve all of them。&lt;/p&gt;

&lt;p&gt;In the meantime, new functions were being developed rapidly, and it was easy to create new code containing type errors. In order to solve this problem, we wanted to first tighten type checking so that newly added code would be type-protected, and then safely begin modification of existing code in that state.&lt;br&gt;
To do this, we needed to add a comment (&lt;code&gt;@ts-expect-error&lt;/code&gt; or &lt;code&gt;@ts-ignore&lt;/code&gt;) to all existing type errors to nullify them, and we developed this CLI tool to automate this process.&lt;/p&gt;
&lt;h2&gt;
  
  
  Technology used
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;TypeScript&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/dsherret/ts-morph"&gt;ts-morph&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://vitest.dev/"&gt;vitest&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All code is available on GitHub.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/kawamataryo/suppress-ts-errors"&gt;https://github.com/kawamataryo/suppress-ts-errors&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  That's it!
&lt;/h2&gt;

&lt;p&gt;Then finish!&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;br&gt;
Please send me a message if you need.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/KawamataRyo"&gt;https://twitter.com/KawamataRyo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/kawamataryo/suppress-ts-errors"&gt;https://github.com/kawamataryo/suppress-ts-errors&lt;/a&gt;&lt;/p&gt;


</description>
      <category>typescript</category>
      <category>cli</category>
      <category>node</category>
      <category>vue</category>
    </item>
    <item>
      <title>How to quickly find the page  from your browser's history, bookmarks, and tabs.</title>
      <dc:creator>ryo</dc:creator>
      <pubDate>Fri, 11 Feb 2022 23:39:10 +0000</pubDate>
      <link>https://dev.to/kawamataryo/how-to-quickly-find-the-page-from-your-browsers-history-bookmarks-and-tabs-37eo</link>
      <guid>https://dev.to/kawamataryo/how-to-quickly-find-the-page-from-your-browsers-history-bookmarks-and-tabs-37eo</guid>
      <description>&lt;p&gt;Hi, I've created an web extension that can find the page you want from your browser's history, bookmarks and tabs.&lt;/p&gt;

&lt;p&gt;In this article, I will explain how to use this web extension.&lt;/p&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;p&gt;An extension with the following features&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Incremental search across history, bookmarks, and currently open tabs&lt;/li&gt;
&lt;li&gt;Click and enter to move to the target.&lt;/li&gt;
&lt;li&gt;Smooth operation with keyboard shortcuts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/ec4r1lt3Ud8"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;The name of this extension is cikamichi.&lt;br&gt;
The Japanese meaning of chikamichi is a shorter way.&lt;/p&gt;

&lt;p&gt;All processing is done within the browser. No history data will be sent to the any server.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to use
&lt;/h2&gt;

&lt;p&gt;You can install it from Chrome web store or FireFox AMO.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://addons.mozilla.org/firefox/addon/chikamichi/"&gt;Firefox Add-Ons Repository (AMO)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://chrome.google.com/webstore/detail/chikamichi/gkhobepjbiepngbeikhbpnfgjcjgmgha"&gt;Chrome Web Store&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After downloading the extension, press the &lt;code&gt;alt（option） + k&lt;/code&gt; key to launch the search dialog.&lt;/p&gt;

&lt;p&gt;Use useful shortcuts and search prefixes.&lt;br&gt;
You can get to the page you want with just a few keyboard strokes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Shortcuts&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;shortcut&lt;/th&gt;
&lt;th&gt;action&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Alt + k&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Open search dialog&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;↓&lt;/code&gt; or &lt;code&gt;↑&lt;/code&gt; (&lt;code&gt;Ctrl + n&lt;/code&gt; or &lt;code&gt;Ctrl + p&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Select history&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Enter&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Open the selected url&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Ctrl + Enter&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Open the selected url in new tab&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Search commands&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;commands&lt;/th&gt;
&lt;th&gt;action&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/h&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Search only histories&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/b&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Search only bookmarks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Search only tabs&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Technology used
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;TypeScript&lt;/li&gt;
&lt;li&gt;Vue.js&lt;/li&gt;
&lt;li&gt;&lt;a href="https://windicss.org/"&gt;Windi CSS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://fusejs.io/"&gt;Fuse.js&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/antfu/webext-bridge"&gt;Webext-bridge&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All extension code is available on GitHub.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/kawamataryo/chikamichi"&gt;https://github.com/kawamataryo/chikamichi&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  That's it!
&lt;/h2&gt;

&lt;p&gt;Then finish!&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;br&gt;
This is my first post on devto and I'm happy to introduce my web extensions :)&lt;/p&gt;

&lt;p&gt;Please send me a message if you need.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/KawamataRyo"&gt;https://twitter.com/KawamataRyo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/kawamataryo/chikamichi"&gt;https://github.com/kawamataryo/chikamichi&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>typescript</category>
      <category>vue</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
