Fuco1 / flow-js2-mode

[UNMAINTAINED] Support for flow for js2-mode
GNU General Public License v3.0
46 stars 3 forks source link

Combination types not correctly fontitied #10

Closed rNoz closed 6 years ago

rNoz commented 6 years ago

Hi,

function some(a: number | string, b: {} | any[]) : bool {
  return true;
}

Gives number without font-lock-type-face (but string is correct).

Also, thanks for this mode, I really like it (and need it).

Are you planning to support Promise<any>, Array<any>?

Fuco1 commented 6 years ago

Thanks for the report!

I plan to support everything eventually :) I'm quite new to JS/Flow so I pretty much fix things as I come along the problems, so reporting issues definitely speed up the process! Generics work for some cases but probably not yet those you describe. I will open a separate issue to track that and keep this for the font-lock.

Fuco1 commented 6 years ago

FYI generics like Promise<T> should work on master now.