Sailing
Sailing

Reputation: 335

Some JavaScript Grammar Questions on React-Native

I have read source code on https://github.com/stage88/react-weather
I find there are some strange JS grammars in it, for example:

type Props = {
    postcodes: Array<Postcode>;
    dispatch: any;
    navigator: any;
};

and

(this: any).onSearchBarPressed = this.onSearchBarPressed.bind(this);

I can not find detail description for this by Google and Mozilla Developer Network, does React-Native make them? Webstrom also show errors for these code :(

Is there any detail explanation for these grammar ?

Upvotes: 0

Views: 102

Answers (1)

Jacob
Jacob

Reputation: 78850

This project is using Flow, a static type checker (which looks deceptively like TypeScript).

Upvotes: 1

Related Questions