ecmascript 6 - Is "type" a keyword in JavaScript? -


i came across using "type" in a piece of es6 code.

export type action =   {     type: 'todo/complete',     id: string,   } |   {     type: 'todo/create',     text: string,   } |   {     type: 'todo/destroy',     id: string,   } |   {     type: 'todo/destroy-completed',   } |   {     type: 'todo/toggle-complete-all',   } |   {     type: 'todo/undo-complete',     id: string,   } |   {     type: 'todo/update-text',     id: string,     text: string,   }; 

couldn't find sheds light on it. keyword? do?

as mentioned pitaj, type symbol here not part of es6, rather part of flow static type checker.

here docs type symbol.


Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -