Skip to content

no-cycle should accept Flow "typeof" imports, just like "type" #2607

Closed
@gnprice

Description

@gnprice

This is an extension of #1098 / #1343. In addition to import type, Flow has a syntax import typeof. For example (try-flow link):

import typeof { useEffect } from 'react';

var f: useEffect; // has the same type as React.useEffect

Like with import type, these imports are transpiled away and have no effect at runtime, so they should be given the same treatment as import type: that is, they should be ignored.

Currently they're not.

I have a fix which I'll send in a bit.

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