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

Python Pandas join aggregated tables -

java - Static nested class instance -

process - Python What is the difference between a Pool of worker processes and just running multiple Processes? -