Fix various minor typescript errors

This commit is contained in:
Oliver Blanthorn 2021-05-01 14:25:38 +02:00
parent 4e50ab4866
commit afda42e7f9
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3
3 changed files with 10 additions and 6 deletions

View file

@ -29,7 +29,7 @@ export abstract class CompletionOption {
/** What to fill into cmdline */ /** What to fill into cmdline */
value: string value: string
/** Control presentation of the option */ /** Control presentation of the option */
state: OptionState abstract state: OptionState
} }
export abstract class CompletionSource { export abstract class CompletionSource {
@ -94,7 +94,7 @@ export abstract class CompletionSource {
/** Update [[node]] to display completions relevant to exstr */ /** Update [[node]] to display completions relevant to exstr */
public abstract filter(exstr: string): Promise<void> public abstract filter(exstr: string): Promise<void>
abstract async next(inc?: number): Promise<boolean> abstract next(inc?: number): Promise<boolean>
} }
// Default classes // Default classes

View file

@ -402,8 +402,8 @@ interface Hintables {
export function hintPage( export function hintPage(
hintableElements: Hintables[], hintableElements: Hintables[],
onSelect: HintSelectedCallback, onSelect: HintSelectedCallback,
resolve = () => {}, // eslint-disable-line @typescript-eslint/no-empty-function resolve: (x?) => void = () => {}, // eslint-disable-line @typescript-eslint/no-empty-function
reject = () => {}, // eslint-disable-line @typescript-eslint/no-empty-function reject: (x?) => void = () => {}, // eslint-disable-line @typescript-eslint/no-empty-function
rapid = false, rapid = false,
) { ) {
const buildHints: HintBuilder = defaultHintBuilder() const buildHints: HintBuilder = defaultHintBuilder()

View file

@ -3274,7 +3274,7 @@ export async function fillcmdline_tmp(ms: number, ...strarr: string[]) {
const str = strarr.join(" ") const str = strarr.join(" ")
showcmdline(false) showcmdline(false)
Messaging.messageOwnTab("commandline_frame", "fillcmdline", [strarr.join(" "), false, false]) Messaging.messageOwnTab("commandline_frame", "fillcmdline", [strarr.join(" "), false, false])
return new Promise(resolve => return new Promise<void>(resolve =>
setTimeout(async () => { setTimeout(async () => {
if ((await Messaging.messageOwnTab("commandline_frame", "getContent", [])) === str) { if ((await Messaging.messageOwnTab("commandline_frame", "getContent", [])) === str) {
CommandLineContent.hide_and_blur() CommandLineContent.hide_and_blur()
@ -4762,7 +4762,11 @@ export function buildFilterConfigs(filters: string[]): Perf.StatsFilterConfig[]
} else if (filter === ":measure") { } else if (filter === ":measure") {
return { kind: "eventType", eventType: "measure" } return { kind: "eventType", eventType: "measure" }
} else { } 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 }
} }
}, },
) )