mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
Fixes #127439: changes keys to a function
This commit is contained in:
parent
d136153476
commit
3cca828813
6
src/vs/vscode.d.ts
vendored
6
src/vs/vscode.d.ts
vendored
|
@ -6215,9 +6215,11 @@ declare module 'vscode' {
|
|||
export interface Memento {
|
||||
|
||||
/**
|
||||
* The stored keys.
|
||||
* Returns the stored keys.
|
||||
*
|
||||
* @return The stored keys.
|
||||
*/
|
||||
readonly keys: readonly string[];
|
||||
keys(): readonly string[];
|
||||
|
||||
/**
|
||||
* Return a value.
|
||||
|
|
|
@ -56,7 +56,7 @@ export class ExtensionMemento implements vscode.Memento {
|
|||
}, 0);
|
||||
}
|
||||
|
||||
get keys(): readonly string[] {
|
||||
keys(): readonly string[] {
|
||||
// Filter out `undefined` values, as they can stick around in the `_value` until the `onDidChangeStorage` event runs
|
||||
return Object.entries(this._value ?? {}).filter(([, value]) => value !== undefined).map(([key]) => key);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue