Giter Club home page Giter Club logo

io-flow-types's People

Contributors

gcanti avatar orlandoc-cb avatar orlandoc01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

io-flow-types's Issues

Union type with undefined

Hello,
I'm getting an error on this:

t.exact({
  required: {
    myField: t.union([t.Object, t.Undefined]),
   ...
  },

I'd like to be sure on this type:

type MyType = {
  myField: ?Object,
  ...
}

Or construction I'm using is not correct?
image

Flowtype errors

At least the latest Flowtype 0.110.1 gives me several errors like that:

Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/io-flow-types/lib/types/props/exact.js.flow:8:37

Cannot determine a type for object type [1]. object type [2] cannot be spread because the indexer string [3] may
overwrite properties with explicit keys in a way that Flow cannot track. Can you spread object type [2] first or remove
the indexer?

        node_modules/io-flow-types/lib/types/props/exact.js.flow
         5│ import type { MixedFlowType, Is, Validate, Context, Encode } from '../index.js';
         6│
         7│ type ExactObj<Required: Props, Optional: Props> = $Rest<
 [1][2]  8│   {| ...$Exact<Required>, ...$Exact<Optional> |},
         9│   $Rest<Optional, {}>
        10│ >;
        11│

        node_modules/io-flow-types/lib/types/props/base.js.flow
    [3] 30│ export type Props = $ReadOnly<{ [key: string]: MixedFlowType }>;

Any workaround, please?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.