Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do some types in Flow libdefs have dollar sign in the begining

Some libdefs in flow-typed respository have types, started with the dollar sign, like $AxiosXHR:

enter image description here

It looks like it declares globally available type, but I am not sure, and I haven't found any documentation about it.

like image 563
Nikolai Mavrenkov Avatar asked Dec 18 '17 08:12

Nikolai Mavrenkov


People also ask

What did the Lib Dems used to be called?

At the September 1988 conference it adopted the short form name "the Democrats" and in October 1989 changed its name to "Liberal Democrats".

How many Lib Dem MPs are there?

Eleven Liberal Democrat Members of Parliament (MPs) were elected to the House of Commons of the United Kingdom at the 2019 general election.

What do liberals stand for?

Liberals espouse a wide array of views depending on their understanding of these principles, but they generally support individual rights (including civil rights and human rights), liberal democracy, secularism, rule of law, economic and political freedom, freedom of speech, freedom of the press, freedom of religion, ...


1 Answers

Right now there's not a good way to write types inside declare module {} bodies that aren't exported, so the best option is to put a declaration outside the declare module {} and reference it.
To prevent clashing names, it's a convention to put something like $npm$ModuleName$ before the type/var name.

Ref: flow-typed CONTRIBUTING notes

like image 150
MichaelDeBoey Avatar answered Oct 02 '22 05:10

MichaelDeBoey