Skip to content

cypress/angular-signals support for InputSignalWithTransformΒ #30682

Open
@bohoffi

Description

@bohoffi

What would you like?

#29264 brought support for the assignment of pure InputSignal which works fine as long as you do not plan on working with InputSignalWithTransform like:

public readonly enablePreview: InputSignalWithTransform<boolean, unknown> = input(false, {
  transform: booleanAttribute
});

Why is this needed?

The componentProperties of MountConfig<T> from cypress/angular-signals needs to be updated from

componentProperties?: Partial<{
        [P in keyof T]: T[P] extends InputSignal<infer V> ? InputSignal<V> | WritableSignal<V> | V : T[P];
    }>;

to

componentProperties?: Partial<{
        [P in keyof T]: T[P] extends InputSignal<infer V> | InputSignalWithTransform<infer V, unknown> ? InputSignal<V> | WritableSignal<V> | V : T[P];
    }>;

I'd be willing to provide a PR adding the missing type.

Metadata

Metadata

Assignees

Labels

CTIssue related to component testingnpm: @cypress/angular@cypress/angular package issuesstage: needs investigatingSomeone from Cypress needs to look at this

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions