0no-co / wonka

🎩 A tiny but capable push & pull stream library for TypeScript and Flow
MIT License
709 stars 29 forks source link

4.0.5 Flow Types are broken #67

Closed marcusdarmstrong closed 4 years ago

marcusdarmstrong commented 4 years ago

Sampling:

Error ----------------------------------------------- node_modules/wonka/dist/types/src/Wonka_operators.gen.js.flow:3:10

Cannot import the type operatorT as a value. Use import type instead.

     1| // @flow
     2|
     3| import { operatorT as Wonka_types_operatorT } from "./Wonka_types.gen";
     4| import { sourceT as Wonka_types_sourceT } from "./Wonka_types.gen";
     5| declare export var buffer: <a, b>(
     6|   _1: Wonka_types_sourceT<a>

Error ----------------------------------------------- node_modules/wonka/dist/types/src/Wonka_operators.gen.js.flow:4:10

Cannot import the type sourceT as a value. Use import type instead.

     1| // @flow
     2|
     3| import { operatorT as Wonka_types_operatorT } from "./Wonka_types.gen";
     4| import { sourceT as Wonka_types_sourceT } from "./Wonka_types.gen";
     5| declare export var buffer: <a, b>(
     6|   _1: Wonka_types_sourceT<a>
     7| ) => Wonka_types_operatorT<b, b[]>;

Error --------------------------------------------------- node_modules/wonka/dist/types/src/Wonka_sinks.gen.js.flow:3:10

Cannot import the type sourceT as a value. Use import type instead.

     1| // @flow
     2|
     3| import { sourceT as Wonka_types_sourceT } from "./Wonka_types.gen";
     4| import { subscriptionT as Wonka_types_subscriptionT } from "./Wonka_types.gen";
     5| export type subscribeConsumerT<a> = (
     6|   _1: Wonka_types_sourceT<a>

Looks like it's due to this: https://github.com/joarwilk/flowgen/issues/74

I'll be working around this with a local fork of the generated typedefs, but I figured you'd want to know.

kitten commented 4 years ago

Oh awesome, thanks for letting me know! I’ll put the flow checks back in place and will see whether I can get this fixed with some quick finds&replaces in the generate script 👍

kitten commented 4 years ago

@marcusdarmstrong Would you like to give #68 a try? Pika CI should build a temporary package, which will show up here once it's done: https://github.com/kitten/wonka/pull/68/checks?check_run_id=383809151