Comments (14)
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.
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.
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.
@ryyppy Makes sense to me.
from flow-typed.
@ryyppy @bwestergard I will look into it, unless anybody is up for a PR
from flow-typed.
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.
@jeffmo I think we should wait till 0.28 ships then
from flow-typed.
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.
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.
@mwalkerwells: How long does it stay at 100% ? Also, how many flow worker processes do you see loaded in the background?
from flow-typed.
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.
@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.
#188
that took me a while:)
from flow-typed.
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)
- @floating-ui/react
- rimraf is missing v4/5 HOT 1
- Workspace key is missing in the v4 docs
- Defintion koa-path-match
- Jest missing test case timeout HOT 2
- Dependency's dependency definitions should only consider `dependencies` HOT 1
- base-64
- add definition for body-scroll-lock-upgrade
- Add use-debounce definition
- [Question]: How to fix flowgen test after flow update HOT 1
- webpack v5 missing ProgressPlugin
- Jest support node api functions
- react-native loaded into test runner HOT 2
- use-debounced useDebounceCallback needs improvement
- body-scroll-lock-upgrade is declared wrong
- axios is missing signal property in config HOT 1
- new definition module-alias
- faker needs to add `person` from v8 onwards
- Add `worker_threads` to node environment
- Axios missing `instance.interceptors.request.clear()`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flow-typed.