mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-12 09:50:11 -05:00
continue to suppor legacy parameter hints config, #81256
This commit is contained in:
@@ -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)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user