esturcke / immer-flow-bug

Flow failing to find shipped type definitions

Home Page:https://github.com/immerjs/immer/issues/554

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ› Bug Report

Flow does not seem to be finding the shipped flow type definitions after upgrading to v6. I can get flow to find the type definitions by running:

cp node_modules/immer/dist/{immer,index}.js.flow

Link to repro

https://github.com/esturcke/immer-flow-bug

To Reproduce

  1. Run flow

    yarn flow
    

Observed behavior

Warning β”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆβ”ˆ src/App.js:3:8

Importing from an untyped module makes it any and is not safe! Did you mean to add // @flow to the top of immer?
(untyped-import)

     1β”‚ // @flow
     2β”‚ import React from "react";
     3β”‚ import produce from "immer";
     4β”‚ import logo from "./logo.svg";
     5β”‚ import "./App.css";
     6β”‚



Found 1 warning
✨  Done in 4.57s.

Expected behavior

No flow warnings.

Environment

  • Immer version: 6.0.2

About

Flow failing to find shipped type definitions

https://github.com/immerjs/immer/issues/554


Languages

Language:JavaScript 71.5%Language:HTML 18.5%Language:CSS 10.0%