Coder Social home page Coder Social logo

Flow types about polished HOT 7 CLOSED

styled-components avatar styled-components commented on May 14, 2024
Flow types

from polished.

Comments (7)

mxstbr avatar mxstbr commented on May 14, 2024

Hmm, haven't thought about it. We probably won't use it in the code itself but I wouldn't mind adding a libdef for others to use! /cc @styled-components/typers

from polished.

relekang avatar relekang commented on May 14, 2024

Why not use it in the code? I haven't looked that much in this repo yet. I have time to do a PR for this tomorrow.

from polished.

mxstbr avatar mxstbr commented on May 14, 2024

Because there isn't much code that we use throughout the codebase, almost every function is an external API, so flowtypes within the codebase would be pretty useless

from polished.

relekang avatar relekang commented on May 14, 2024

I think there are a few benefits:

  • It is easier to keep the types up to date, we test that the types actually work if we have @flow our test files.
  • Making sure the data in the tests is still applicable.
  • It is much easier to iron out the enhancement of exporting of types in a smaller repo like this than the styled-components repo 🙂

from polished.

guzart avatar guzart commented on May 14, 2024

That is precisely why I was asking, I was about to start working on a PR when I thought it would be nice to have flow type support form the start.

from polished.

mxstbr avatar mxstbr commented on May 14, 2024

Okay, I'm convinced, sounds good to me! Feel free to ahead with a PR!

from polished.

guzart avatar guzart commented on May 14, 2024

Too bad I can't help with this, my flow xp is very low. Looking forward to learn from the commit tho =D

from polished.

Related Issues (20)

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.