我在Flow中定义了以下类型:
export type MovementInfo = { id: string, x: number, y: number, s: [number, number] }
export type TypeInfo = { eType: string, idx: number }
export type CreationInfo = TypeInfo & MovementInfo
export type CmdNew = { type: 'new' } & CreationInfo
在VSCode Flow中,在第3行和TypeInfo
中为MovementInfo
和{ type: 'new' }
加下划线
4,并给我以下错误:
[flow] object type (This type is incompatible with an implicitly-returned undefined.)
使用Flow 0.49.1
是我还是Flow做一些蠢事?