Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@phosphor/commands

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@phosphor/commands - npm Package Compare versions

Comparing version 1.4.0 to 1.5.0

11

lib/index.d.ts

@@ -70,3 +70,4 @@ import { ReadonlyJSONObject } from '@phosphor/coreutils';

*
* @param id - The id of the command which has changed.
* @param id - The id of the command which has changed. If more than
* one command has changed, this argument should be omitted.
*

@@ -82,3 +83,3 @@ * @throws An error if the given `id` is not registered.

*/
notifyCommandChanged(id: string): void;
notifyCommandChanged(id?: string): void;
/**

@@ -488,8 +489,10 @@ * Get the display label for a specific command.

* The id of the associated command.
*
* This will be `undefined` when the type is `'many-changed'`.
*/
readonly id: string;
readonly id: string | undefined;
/**
* Whether the command was added, removed, or changed.
*/
readonly type: 'added' | 'removed' | 'changed';
readonly type: 'added' | 'removed' | 'changed' | 'many-changed';
}

@@ -496,0 +499,0 @@ /**

@@ -138,3 +138,4 @@ "use strict";

*
* @param id - The id of the command which has changed.
* @param id - The id of the command which has changed. If more than
* one command has changed, this argument should be omitted.
*

@@ -151,6 +152,6 @@ * @throws An error if the given `id` is not registered.

CommandRegistry.prototype.notifyCommandChanged = function (id) {
if (!(id in this._commands)) {
if (id !== undefined && !(id in this._commands)) {
throw new Error("Command '" + id + "' is not registered.");
}
this._commandChanged.emit({ id: id, type: 'changed' });
this._commandChanged.emit({ id: id, type: id ? 'changed' : 'many-changed' });
};

@@ -157,0 +158,0 @@ /**

{
"name": "@phosphor/commands",
"version": "1.4.0",
"version": "1.5.0",
"description": "PhosphorJS - Commands",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc