???? ??? HashHistory? History {
???? ?????. (router: VueRouter, base: ?string, fallback: boolean) {
}
?? ? ? ??? ??? ????? ?? ?-? ? ??? ??? ????, ?? "base: ? string"? "?"? ??? ?????? ??? ??????. ?????!
??? ES6 ??? ??? flow.js?? ??? ?? ?????.
flow? js ???? ?? ??? ???? ? ???? Facebook?? ?? ?? ?? ??????. ??? JS ?????? ?? ??? ???? ?? ??? ?? ??? ? ????.
Herebase:?string
指的是base這個(gè)形參的傳入需要是一個(gè)?string
類型,?string
? ??? ?????. ?, null ?? ???? ?? ???? ??? ? ??? ?? ??? ?? ??? ?????.
Vue? ?? ????? ?? ?? ?? ?? ??? ?????.
flow.js ?? ????? ?? https://flow.org/en/docs/gett...
??? ??? ES6? ??? ????. ??? TypeScript? ??? ? ?????. ??? ??? ???? ?????. ? ??? ????? ????? TypeScript? ?? ? ?? ?? ??? ????
base:?string
不是 TypeScript 語(yǔ)法,base?: String
?
fallback
不是可選參數(shù),但 TypeScript 中不允許非可選參數(shù)放在可選參數(shù)(base?
? ???
??? ??? ????? ?????