Skip to content

wrong "composes" if spread Flow exact helper function (...$Exact<OtherProps>) #248

Closed
@millermedeiros

Description

@millermedeiros

If I have code like:

import type {Props as BarProps} from 'Bar.react';

const Bar = require('Bar.react');

type Props = {|
  ...$Exact<BarProps>,
  somePropOverride: 'baz',
|};

class Foo extends React.Component<Props> {
  render() {
    return <Bar {...this.props} />;
  }
}

the composes field will include one item named "$Exact", which is weird... - I would expect it to include "Bar.react" (if it was smart enough to figure out that BarProps was used as Props on Bar.react) or at least leave the composes empty.

tested on v3.0.0-beta10

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