Remove unnecessary type assertion

This commit is contained in:
Oliver Blanthorn 2020-12-08 19:03:16 +01:00
parent 85cf5ae291
commit d2ae4a2293
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3

View file

@ -279,9 +279,7 @@ async function history(n) {
// Check for matches in history, removing duplicates // Check for matches in history, removing duplicates
const matches = R.reverse( const matches = R.reverse(
// for some reason ramda loses the type information here R.uniq(R.reverse(await State.getAsync("cmdHistory"))),
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
R.uniq(R.reverse((await State.getAsync("cmdHistory")) as string[])),
).filter(key => key.startsWith(HISTORY_SEARCH_STRING)) ).filter(key => key.startsWith(HISTORY_SEARCH_STRING))
if (commandline_state.cmdline_history_position === 0) { if (commandline_state.cmdline_history_position === 0) {
cmdline_history_current = commandline_state.clInput.value cmdline_history_current = commandline_state.clInput.value