simulacrum icon indicating copy to clipboard operation
simulacrum copied to clipboard

Create better typing around simulator options

Open dagda1 opened this issue 3 years ago • 0 comments

Currently, it is too easy to pass the wrong config in when creating a simulation because of this interface

export interface SimulationOptions {
  options?: Record<string, unknown>;

The code below will type check even though clientId is cased incorrectly

     createSimulation(simulator: "auth0",
      options: {
        options:{
          clientId: "[your client-id]"

This codesandbox was a quick spike for one way this could be significantly improved.

dagda1 avatar Aug 15 '22 15:08 dagda1