Giter Site home page Giter Site logo

Comments (14)

jeffmo avatar jeffmo commented on May 22, 2024 1

Support for both named and default exports inside a declare module will ship in 0.28 (no later than early next week). In the meantime, declare module bodies can only export one or the other:

Named via declare module.exports: {namedExport1: number, namedExport2: string};
Default via declare module.exports: MyDefaultExportHere;

In 0.28 and beyond, it will be possible to do:

declare module "MyModule" {
  declare export var namedExport1: number;
  declare export var namedExport2: string;
  declare export default MyDefaultExportHere;
}

from flow-typed.

alexeygolev avatar alexeygolev commented on May 22, 2024 1

Just a quick update. Still working on it. Should be able to submit a PR before Monday. Found a couple of wrong typings along the way:-P

from flow-typed.

ryyppy avatar ryyppy commented on May 22, 2024

Actually, should Ramda be exported as a class with mixins?
I understand that the idea of those classes is to categorize the functions and mixins does a great job "spreading" those functions across one single export class... but to make named imports work, I guess we need to export an Object type?

from flow-typed.

bwestergard avatar bwestergard commented on May 22, 2024

@ryyppy Makes sense to me.

from flow-typed.

alexeygolev avatar alexeygolev commented on May 22, 2024

@ryyppy @bwestergard I will look into it, unless anybody is up for a PR

from flow-typed.

ryyppy avatar ryyppy commented on May 22, 2024

I think @jeffmo said something about syntax support for named exports in declare module scope... maybe this will ease the work implementing named imports?

from flow-typed.

alexeygolev avatar alexeygolev commented on May 22, 2024

@jeffmo I think we should wait till 0.28 ships then

from flow-typed.

sebinsua avatar sebinsua commented on May 22, 2024

Looks like [email protected] was released yesterday. Has anybody taken a look at getting this to work?

Is it possible to use declare export var [...] to output each of the functions within RType as named exports? (Aware that class was being used here to group related types.)

from flow-typed.

mwalkerwells avatar mwalkerwells commented on May 22, 2024
import Ramda from 'ramda';
const { curry, compose, reduce, keys, append } = Ramda;

@bwestergard / @jeffmo When I add line #2 (even if I remove the // @flow comment), flow instantly consumes 100% cpu after saving the file. Any idea why?

Using [email protected] & ramda_v0.21.x

from flow-typed.

jeffmo avatar jeffmo commented on May 22, 2024

@mwalkerwells: How long does it stay at 100% ? Also, how many flow worker processes do you see loaded in the background?

from flow-typed.

mwalkerwells avatar mwalkerwells commented on May 22, 2024

Really strange, but I can't get it to repro anymore. It was doing it all yesterday @ early today too. Atom command + click for modules wouldn't work in the meantime as well. It had 1/4 processes pegged @ 100% indefinitely iirc.

from flow-typed.

alexeygolev avatar alexeygolev commented on May 22, 2024

@sebinsua: Working on it now. Hope to create a PR later today/tomorrow
Will also fix some bugs like empty generics introduced by [email protected]

from flow-typed.

alexeygolev avatar alexeygolev commented on May 22, 2024

#188
that took me a while:)

from flow-typed.

alexeygolev avatar alexeygolev commented on May 22, 2024

This can be closed I guess @mwalkerwells @sebinsua @bwestergard
I guess the aforementioned performance hiccup could be discussed in a separate issue?

from flow-typed.

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.