cra*_*man 21 javascript ecmascript-6
我刚刚在一段ES6代码中遇到过使用"type"的人.
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,
};
Run Code Online (Sandbox Code Playgroud)
找不到任何能够揭示它的东西.它是关键字吗?它到底是做什么的?
归档时间: |
|
查看次数: |
10013 次 |
最近记录: |