You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
15: var a: DecoratedConfig = { ^ Cannot assign object literal to `a` because property `cartocss_version2` is missing in object type [1] but exists in object type [2] in array element of property `layers`.
References:
5: layers: {|type: string, options: {foo: number}|}[];
^ [1]
11: <V>() => V & {cartocss_version2: string} ^ [2]
21: a.layers[0].options.cartocss_version2 ^ Cannot get `a.layers[0].options.cartocss_version2` because property `cartocss_version2` is missing in object type [1].
References:
5: layers: {|type: string, options: {foo: number}|}[];
^ [1]
const types = useTypes([
^ Cannot call `useTypes` because null or undefined [1] is incompatible with string [2] in index 0 of type argument `Types`. [incompatible-call]
References:
28: ((Options<T>) => ?$GetType<T>) &
^ [1]
29: ((OptionsWithDefault<T>) => $GetType<T>)
^ [2]
type $RetunFn<T> =
// If both funciton in intersection return the same type,
// no error when calling useTypes
// $Call can handle intersection but TupleMap cannot
// https://github.com/facebook/flow/issues/7523
((Options<T>) => ?$GetType<T>) &
((OptionsWithDefault<T>) => $GetType<T>)
The intersection of functions work with $Call but not with $TupleMap
Flow version: 0.92
Expected behavior
Expected this to pass:
Actual behavior
It doesn't pass, and I get this error:
Link
The text was updated successfully, but these errors were encountered: