Skip to content

Commit

Permalink
fixed ExtensionContext.globalState
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHaxe committed Jan 5, 2025
1 parent 7117bba commit a5b8a36
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/vscode/ExtensionContext.hx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,24 @@ typedef ExtensionContext = {
* A memento object that stores state independent
* of the current opened {@link workspace.workspaceFolders workspace}.
*/
var globalState(default, null):MementoKeysForSync;
var globalState(default, null):Memento;

// & {
// /**
// * Set the keys whose values should be synchronized across devices when synchronizing user-data
// * like configuration, extensions, and mementos.
// *
// * Note that this function defines the whole set of keys whose values are synchronized:
// * - calling it with an empty array stops synchronization for this memento
// * - calling it with a non-empty array replaces all keys whose values are synchronized
// *
// * For any given set of keys this function needs to be called only once but there is no harm in
// * repeatedly calling it.
// *
// * @param keys The set of keys whose values are synced.
// */
// function setKeysForSync(keys:ReadOnlyArray<String>):Void;
// };

/**
* A secret storage object that stores state independent
Expand Down Expand Up @@ -156,20 +173,3 @@ typedef ExtensionContext = {
*/
var languageModelAccessInformation(default, null):LanguageModelAccessInformation;
}

abstract class MementoKeysForSync extends Memento {
/**
* Set the keys whose values should be synchronized across devices when synchronizing user-data
* like configuration, extensions, and mementos.
*
* Note that this function defines the whole set of keys whose values are synchronized:
* - calling it with an empty array stops synchronization for this memento
* - calling it with a non-empty array replaces all keys whose values are synchronized
*
* For any given set of keys this function needs to be called only once but there is no harm in
* repeatedly calling it.
*
* @param keys The set of keys whose values are synced.
*/
abstract function setKeysForSync(keys:ReadOnlyArray<String>):Void;
}

0 comments on commit a5b8a36

Please sign in to comment.