Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Type generics for React components break syntax highlighting #49

Description

@kaiyoma

Prerequisites

Steps to Reproduce

Enter this text and set the type to "TypeScriptReact":

// Add all the single-select stories first.
ALL_OPTIONS.forEach(({ name, options, stateKey }) => {
  storiesOf('Select', module).add(`Single value - ${name}`, () => (
    <State store={store}>
      {(state: PlainObject<string | string[]>) => (
        <Select<unknown>
          className='select-story-component'
        />
      )}
    </State>
  ));
});

// Add all the multi-select stories next.
ALL_OPTIONS.forEach(({ name, options, stateKey }) => {
  storiesOf('Select', module).add(`Multiple values - ${name}`, () => (
    <State store={store}>
      {(state: PlainObject<string | string[]>) => (
        <Select<unknown>
          className='select-story-component'
        />
      )}
    </State>
  ));
});

Actual behavior:

image

Reproduces how often:

100%

Versions

$ atom --version

Atom    : 1.45.0
Electron: 4.2.7
Chrome  : 69.0.3497.128
Node    : 10.11.0

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions