function higherOrderFn<T extends (...args: any[]) => any>(fn: T): (...args: Parameters<T>) => ReturnType<T> {
return (...args: Parameters<T>) => {
return fn(args);
};
}
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
// other way | |
function isNumber(evt) { | |
evt = (evt) ? evt : window.event; | |
var charCode = (evt.which) ? evt.which : evt.keyCode; | |
if (charCode > 31 && (charCode < 48 || charCode > 57)) { | |
return false; | |
} | |
return true; | |
} |
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
button, | |
html input[type="button"], | |
input[type="reset"] { | |
border: none; | |
-webkit-appearance: none; | |
cursor: pointer; | |
} | |
button[disabled], | |
html input[disabled] { |
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
// TODO check to `passive` param | |
function clearEventListener(target) { | |
var listeners = getEventListeners(target); | |
for (const key in listeners) { | |
if (!listeners.hasOwnProperty(key)) { | |
continue; | |
} |
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
function collectIncorrectAnswersAndCopyToBuffer(withSpoiler) { | |
const elsList = document.querySelector('main > ol'); | |
function getAnswerFromStorage(key) { | |
const value = localStorage.getItem(key); | |
if (!value) { | |
return 'Unknown'; | |
} |
emulator-commandline documentation
For first download Android Studio.
For start emulator
OlderNewer