Skip to content

sbyte, ushort, uint, ulong get converted to any #54

Description

@PaulBol

Installed product versions

  • Visual Studio: 16.11.1
  • This extension: 2.2.5.0

Description

sbyte, ushort, uint, ulong get converted to any. Wouldn't number make more sense since JavaScript can handle BigIntegers?

Steps to recreate

Generate TypeScript for the following class

public class MyClass
{
    public byte Byte { get; set; }
    public sbyte SByte { get; set; }
    public short Short { get; set; }
    public ushort UShort { get; set; }
    public int Int { get; set; }
    public uint UInt { get; set; }
    public long Long { get; set; }
    public ulong ULong { get; set; }
}

Current behavior

Result is

export interface MyClass {
    Byte: number;
    SByte: any;
    Short: number;
    UShort: any;
    Int: number;
    UInt: any;
    Long: number;
    ULong: any;
}

Expected behavior

export interface MyClass {
    Byte: number;
    SByte: number;
    Short: number;
    UShort: number;
    Int: number;
    UInt: number;
    Long: number;
    ULong: number;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions