Flow 中文全攻略
1.0.0
1.0.0
  • 介紹本書
  • 起步走
    • Flow 簡介
    • 環境安裝
    • 實際使用
  • 型別總覽 ( Type Annotations )
    • Utility Types
    • 型別扮演表達式 ( Type Casting Expressions )
    • 模組化 ( Module Types )
  • 設定
    • .flowconfig
    • .flowconfig [include]
    • .flowconfig [ignore]
    • .flowconfig [untyped]
    • .flowconfig [declarations]
    • .flowconfig [lib]
    • .flowconfig [options]
Powered by GitBook
On this page

Was this helpful?

  1. 設定

.flowconfig [lib]

自定義型別 library 位置

Previous.flowconfig [declarations]Next.flowconfig [options]

Last updated 4 years ago

Was this helpful?

我們的 Flow 專案在使用第三方套件的時候因為第三方套件不一定是用 Flow 來開發的,這時候我們可以自己去幫套件額外寫,或是使用現有的 社群維護的型別定義,而預設情況下,這種額外的定義檔都會放在 flow-typed 目錄底下。

若是 .flowconfig 中的 [lib] 不寫任何東西,預設會將 flow-typed 目錄當做型別定義的 library,不過有需要的話,我們還是可以在 [lib] 底下定義自己指定的目錄或檔案作為型別定義 library 的哦! ( 像是 vue2 中就有使用 [lib] 來定義 flow 目錄為型別定義 library 呢! 參考 )

參考 Vue2 中的 .flowconfig 檔案

[ignore]
💩 略過

[include]

[libs]
flow

[options]
💩 略過
flow-typed
Vue Github