[improvement] Info: tsx (#2768)

This commit is contained in:
neverland
2019-02-17 18:09:26 +08:00
committed by GitHub
parent a6a733f735
commit 1d84d33264
4 changed files with 46 additions and 33 deletions
+2 -2
View File
@@ -13,7 +13,7 @@ type Mods = Mod | Mod[];
const ELEMENT = '__';
const MODS = '--';
function join(name: string, el: string, symbol: string): string {
function join(name: string, el?: string, symbol?: string): string {
return el ? name + symbol + el : name;
}
@@ -36,7 +36,7 @@ function prefix(name: string, mods: Mods): Mods {
return ret;
}
export default (name: string) => (el: Mods, mods?: Mods): Mods => {
export default (name: string) => (el?: Mods, mods?: Mods): Mods => {
if (el && typeof el !== 'string') {
mods = el;
el = '';