2017-06-21 8 views
0

私はいくつかのモジュールをインポートすると、Flowを反応して学習していますが、フローはモジュールを見つけることができません。Flowを使って `import`モジュールをチェックする方法は?

モジュールをチェックしないように設定する方法
import axios from "axios"; //requied module not found 

export const fetchPopularRepos = (lang: string) => { 
     var encodedURI = window.encodeURI( // flow not covered 
     "https://api.github.com/search/repositories?q=stars:>1 + language:" + 
      lang + 
      "&sort=stars&order=desc&type=Repositories" 
    ); 
     return axios.get(encodedURI).then(response => response.data.items); 
    }; 

//flow not covered 
export function getProfile(username: string) { 
     return axios 
     .get(`https://api.github.com/users/${username}${params}`) 
     .then(user => user.data); 
    } 
  • は、どのように私はwindow.encodeURIaxios

答えて

0

check this site outをカバーすることができます。必要なパッケージ名を書き、最初の正規表現を無視します。そのハック;)

ので、あなたのケースであなたはflowconfigにそれを無視する必要が

[ignore] 
<PROJECT_ROOT>/node_modules/[^a].* 
関連する問題