Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

No typings generated if module exports object #368

Closed
unstubbable opened this issue Apr 15, 2017 · 0 comments · Fixed by #369
Closed

No typings generated if module exports object #368

unstubbable opened this issue Apr 15, 2017 · 0 comments · Fixed by #369

Comments

@unstubbable
Copy link
Collaborator

Input:

import * as React from 'react';

const Component = ({optionalAny}) => <div />;
Component.propTypes = {
	optionalAny: React.PropTypes.any,
};

const Component2 = () => <div />;

export { Component, Component2 };

Expected output:

declare module 'component' {
  export interface ComponentProps {
    optionalAny?: any;
  }

  export function Component(props: ComponentProps): JSX.Element;

  export function Component2(): JSX.Element;
}

Actual output:

declare module 'component' {
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant