Skip to content

Map<Integer, WhatEver> x produces field with string key instead of number key #80

Open

Description

@atsu85

Generating TypeScript from

class Bug {
  Map<Integer, String> intKeyMap;
}

produces

export interface Bug {
    intKeyMap: { [key: string ]: string;};
  // intKeyMap: { [key: number]: string;}; // <-- EXPECTED
}

but expecting number to be the key instead of string

Activity

  1. crummy commented on Nov 9, 2021

    @crummy

    I think objects in JS always are keyed by string.

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