Skip to content

Flow 0.46 Arity Flag #1223

@deecewan

Description

@deecewan

Flow has shipped a strict_call_arity flag, which will become the only option as of 0.47.

With this flag enabled, there are issues using the Map constructor, at a minimum (I haven't tried the other data types).

MCVE:

  • using flow-bin v0.46 and the strict_call_arity flag set
  • using Immutable 3.8.1
/* @flow */

import { Map } from 'immutable';

const myMap = new Map({ testKey: 'test value' });

resulting in the following error:

testfile.js:26
 26: const myMap = new Map({ testKey: 'test value' });
                           ^^^^^^^^^^^^^^^^^^^^^^^^^ unused function argument
       v------------------------------------------
   34: declare class _Iterable<K, V, KI, II, SI> {
   35:   static Keyed:   KI;
   36:   static Indexed: II;
  ...:
  187: }
       ^ default constructor expects no arguments. See: node_modules/immutable/dist/immutable.js.flow:34

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