This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# useful for cleanup local branches when the remote branch has been deleted (for example merged branch) | |
gdgone='git branch -v | grep " \[gone\] " | awk '\''{ print $1 }'\'' | xargs git branch -D' | |
# updates the local repository branches to the latest and performs cleanup. | |
# gf, gco and gl are alias for git fetch, git checkout and git pull | |
gstart='gf -p && gco master && gdgone && gl && gco develop && gl' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const MissingReturnValue = Symbol('MissingReturnValue') | |
export function debounce<Fn extends (...args: any[]) => any>( | |
fn: Fn, | |
ms: number | |
): (...args: Parameters<Fn>) => ReturnType<Fn> | typeof MissingReturnValue { | |
let debouncing = false | |
let lastReturnedValue: | |
| typeof MissingReturnValue | |
| ReturnType<Fn> = MissingReturnValue |
