mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 09:01:39 -05:00
Fix various minor typescript errors
This commit is contained in:
parent
4e50ab4866
commit
afda42e7f9
3 changed files with 10 additions and 6 deletions
|
@ -29,7 +29,7 @@ export abstract class CompletionOption {
|
|||
/** What to fill into cmdline */
|
||||
value: string
|
||||
/** Control presentation of the option */
|
||||
state: OptionState
|
||||
abstract state: OptionState
|
||||
}
|
||||
|
||||
export abstract class CompletionSource {
|
||||
|
@ -94,7 +94,7 @@ export abstract class CompletionSource {
|
|||
/** Update [[node]] to display completions relevant to exstr */
|
||||
public abstract filter(exstr: string): Promise<void>
|
||||
|
||||
abstract async next(inc?: number): Promise<boolean>
|
||||
abstract next(inc?: number): Promise<boolean>
|
||||
}
|
||||
|
||||
// Default classes
|
||||
|
|
|
@ -402,8 +402,8 @@ interface Hintables {
|
|||
export function hintPage(
|
||||
hintableElements: Hintables[],
|
||||
onSelect: HintSelectedCallback,
|
||||
resolve = () => {}, // eslint-disable-line @typescript-eslint/no-empty-function
|
||||
reject = () => {}, // eslint-disable-line @typescript-eslint/no-empty-function
|
||||
resolve: (x?) => void = () => {}, // eslint-disable-line @typescript-eslint/no-empty-function
|
||||
reject: (x?) => void = () => {}, // eslint-disable-line @typescript-eslint/no-empty-function
|
||||
rapid = false,
|
||||
) {
|
||||
const buildHints: HintBuilder = defaultHintBuilder()
|
||||
|
|
|
@ -3274,7 +3274,7 @@ export async function fillcmdline_tmp(ms: number, ...strarr: string[]) {
|
|||
const str = strarr.join(" ")
|
||||
showcmdline(false)
|
||||
Messaging.messageOwnTab("commandline_frame", "fillcmdline", [strarr.join(" "), false, false])
|
||||
return new Promise(resolve =>
|
||||
return new Promise<void>(resolve =>
|
||||
setTimeout(async () => {
|
||||
if ((await Messaging.messageOwnTab("commandline_frame", "getContent", [])) === str) {
|
||||
CommandLineContent.hide_and_blur()
|
||||
|
@ -4762,7 +4762,11 @@ export function buildFilterConfigs(filters: string[]): Perf.StatsFilterConfig[]
|
|||
} else if (filter === ":measure") {
|
||||
return { kind: "eventType", eventType: "measure" }
|
||||
} else {
|
||||
return { kind: "functionName", functionName: name }
|
||||
// This used to say `functionName: name`
|
||||
// which didn't seem to exist anywhere
|
||||
//
|
||||
// So at least we return something now
|
||||
return { kind: "functionName", functionName: filter }
|
||||
}
|
||||
},
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue