Skip to content

Commit

Permalink
chore: update component types in core (these are mostly unused... for…
Browse files Browse the repository at this point in the history
… now)
  • Loading branch information
Tethik committed Jul 2, 2024
1 parent 9b28a7c commit d8df2b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions core/src/data/models/Model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface DataFlow {
bidirectional: boolean;
}

type ComponentType = "ee" | "ds" | "proc";
type ComponentType = "ee" | "ds" | "proc" | "tb";

// type AuthenticationType =
// | "json-web-token"
Expand Down Expand Up @@ -104,10 +104,11 @@ export interface Component {
x: number;
y: number;
type: ComponentType;
width?: number;
height?: number;
name: string;
classes?: ComponentClass[];
description?: string;
// attributes?: Attributes;
}

export interface ModelData {
Expand Down
8 changes: 4 additions & 4 deletions core/src/data/models/ModelDataService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@ export class ModelDataService extends EventEmitter implements SearchProvider {

/**
* Update the model object of specified id
* @param {string} id - Model id to update
* @param {any} model - Model object to save
* @returns {boolean} - true if an update was performed
*/
async update(id: string, model: { version: string; data: ModelData }) {
async update(
id: string,
model: { version: string; data: ModelData }
): Promise<boolean> {
const previousModel = await this.getById(id);
if (!previousModel) {
this.log.warn(`Attempted to update non-existent model: ${id}`);
Expand Down

0 comments on commit d8df2b0

Please sign in to comment.