提交 46043d41 编写于 作者: J Johannes Rieken

continue to suppor legacy parameter hints config, #81256

上级 ddcdb9dd
......@@ -1871,14 +1871,25 @@ class EditorParameterHints extends BaseEditorOption<EditorOption.parameterHints,
}
public validate(_input: any): InternalParameterHintOptions {
if (typeof _input !== 'object') {
if (typeof _input === 'boolean') {
// legacy
return {
enabled: _input,
cycle: this.defaultValue.cycle
};
} else if (typeof _input !== 'object') {
// invalid
return this.defaultValue;
} else {
//
const input = _input as IEditorParameterHintOptions;
return {
enabled: EditorBooleanOption.boolean(input.enabled, this.defaultValue.enabled),
cycle: EditorBooleanOption.boolean(input.cycle, this.defaultValue.cycle)
};
}
const input = _input as IEditorParameterHintOptions;
return {
enabled: EditorBooleanOption.boolean(input.enabled, this.defaultValue.enabled),
cycle: EditorBooleanOption.boolean(input.cycle, this.defaultValue.cycle)
};
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册