Skip to content

refine simulator connection params #473

@interim17

Description

@interim17

What needs to happen?

Add typing to the params accepted by createSimulatorConnection and the constructors of the ISimulator instances. Decide how these params should relate to the arguments passed to changeFile.

// TODO: refine this as part of the public API for initializing the // controller with a simulator connection interface SimulatorConnectionParams { netConnectionSettings?: NetConnectionParams; clientSimulator?: IClientSimulatorImpl; simulariumFile?: ISimulariumFile; geoAssets?: { [key: string]: string }; requestJson?: boolean; }

public changeFile( connectionParams: SimulatorConnectionParams, // TODO: push newFileName into connectionParams newFileName: string, keepRemoteConnection = false ): Promise<FileReturn> {

  • pull file name out of change file args and push into params
  • make things easy for the front end but also robust
  • add fallbacks for incomplete params from the front end user (net connection settings for example)
  • address what classes should own and use what variables
  • test the related functions
  • strong vs weak typing on the params

Why should we do this?

When does this need to get done?

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenanceCode cleanup/refactoring, test coverage, etc.

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions