6 lines
145 B
JavaScript
6 lines
145 B
JavaScript
![]() |
/* @flow */
|
||
|
|
||
|
const dict: {[key: string]: number} = {}
|
||
|
const k: any = 'foo'
|
||
|
const val: string = dict[k] // error: number incompatible with string
|