尽管验证有效,但我还是收到此错误。我所需要的只是一个函数,该函数使用对象来生成另一个函数来过滤固定类型的参数
Type 'keyof T' does not satisfy the constraint '"a" | "b" | "c"'.
Type 'string' is not assignable to type '"a" | "b" | "c"'.
Type 'keyof T' is not assignable to type '"c"'.
Type 'string' is not assignable to type '"c"'
Run Code Online (Sandbox Code Playgroud)
type GM = {
a: number;
b: string;
c: string
}
type VMeth<T, C > = (old: T, n: C) => any;
const getVF = <T extends { [key in keyof Partial<GM>]: 1 }>(part: T): VMeth<GM, Pick<GM, …
Run Code Online (Sandbox Code Playgroud) 当我在控制台中输入内容并出现建议列表时,如果我按下,Enter则会选择第一个选项。我希望按 按Enter原样运行代码,并且仅当我按 时才插入建议Tab。这可能吗?