Skip to content

Commit

Permalink
Add SArgumentable interface denoting elements that contain args (#106)
Browse files Browse the repository at this point in the history
* Add SArgumentable interface denoting elements that contain args

eclipse-glsp/glsp#194
  • Loading branch information
planger authored Mar 1, 2021
1 parent 954f2d3 commit 525af6f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/client/src/base/args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,14 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { SModelElement } from "sprotty";

export type Args = { [key: string]: string | number | boolean };

export interface SArgumentable {
args: Args;
}

export function hasArguments(element?: SModelElement): element is SModelElement & SArgumentable {
return element !== undefined && 'args' in element;
}

0 comments on commit 525af6f

Please sign in to comment.