Skip to content

Generate Typescript based component #965

Closed
@richarddewit

Description

@richarddewit
rails g react:component HelloTypescript --ts

Expected behavior

Running via Spring preloader in process 1234
      create  app/javascript/components/HelloTypescript.ts(x)

Actual behavior

Running via Spring preloader in process 1234
      create  app/javascript/components/HelloTypescript.js

When I have run bundle exec rails webpacker:install:typescript or when I specify --ts after the generate react:component, I'd like it to create a Typescript component instead of a JS one. (I see there is a --coffee flag too, so a --ts flag would be nice)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions