Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid export for System.Tuple type #187

Open
valdisiljuconoks opened this issue Jan 8, 2024 · 1 comment
Open

Invalid export for System.Tuple type #187

valdisiljuconoks opened this issue Jan 8, 2024 · 1 comment

Comments

@valdisiljuconoks
Copy link

There seems to be an issue exporting Tuple type.

Tools

TypeGen v5.0.1
.NET v8

Model

[ExportTsInterface]
public class ResponseDtoWithTupleDataType
{
    public Tuple<string, decimal>[] SomeDataPoints { get; set; }
}

Exported Type

/**
 * This is a TypeGen auto-generated file.
 * Any changes made to this file can be lost when this file is regenerated.
 */

import { IStructuralEquatable } from './IStructuralEquatable.generated';
import { IStructuralComparable } from './IStructuralComparable.generated';
import { ITupleInternal } from './ITupleInternal.generated';
import { ITuple } from './ITuple.generated';

export class Tuple<T1, T2> implements IStructuralEquatable, IStructuralComparable, ITupleInternal, ITuple {
  item1: T1;
  item2: T2;
}

Error

TS2420	(TS) Class 'Tuple<T1, T2>' incorrectly implements interface 'ITuple'.
  Type 'Tuple<T1, T2>' is missing the following properties from type 'ITuple': length, item

C:\TypeGenInheritanceWithGenerics\TypeGenInheritanceWithGenerics\types\webapi\Tuple.generated.ts	11	
@valdisiljuconoks valdisiljuconoks changed the title Invalid export for Type type Invalid export for System.Tuple type Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant