Skip to content

[Elements] Union typings of arguments of methods does not resolve to union typings in WC and React #15769

@mddragnev

Description

@mddragnev

Description

Now, when React doesn`t need to go through the blazor typings, we should take a look whether we can provide support of union typings for WC and React.

The thing I came across is:
In angular there is a method with the following signature:

public selectRange(arg: GridSelectionRange | GridSelectionRange[] | null | undefined): void

where GridSelectionRange is the following:

export interface GridSelectionRange {
    /** The index of the starting row of the selection range. */
    rowStart: number;
     /** The index of the ending row of the selection range. */
    rowEnd: number;
    /* blazorAlternateType: double */
    /**
     * The identifier or index of the starting column of the selection range.
     * It can be either a string representing the column's field name or a numeric index.
     */
    columnStart: string | number;
    /* blazorAlternateType: double */
    /**
     * The identifier or index of the ending column of the selection range.
     * It can be either a string representing the column's field name or a numeric index.
     */
    columnEnd: string | number;
}

However, in WC and React is as follows:

// Only accepting array of IgcGridSelectionRange
public selectRange(arg: IgcGridSelectionRange[]): void;

and

export declare class IgcGridSelectionRange
{
  public set rowStart(value: number);
      public get rowStart(): number;


public set rowEnd(value: number);
      public get rowEnd(): number;

          
    /* blazorAlternateType: double */
    public set columnStart(value: string);
          public get columnStart(): string;
  
          
    /* blazorAlternateType: double */
    public set columnEnd(value: string);
          public get columnEnd(): string;
  
    }

Where columnEnd and columnStart are of type string

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions