Skip to content

DynamicProperty derive strings don't work with parametric types #10

Closed
@samreid

Description

@samreid

@matthew-blackman and I converted a type to be parametric and found that DynamicProperty derive no longer worked. We would like to investigate that.

In PDLModel.ts, we had to change:

    this.launcherHeightProperty = new DynamicProperty<number, number, Field>( this.fieldProperty, {
      bidirectional: true,
      derive: 'launcherHeightProperty'
    } );

to

    this.launcherHeightProperty = new DynamicProperty<number, number, T>( this.fieldProperty, {
      bidirectional: true,
      derive: t => t.launcherHeightProperty // string no longer works here even though T extends Field
    } );

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions