The type of "req" is not specified. You initialize it with {}, which is
a dict with unknown member type. You assign it a dict in the second
line, but that doesn't change the type. In the third line you try to
access a member of an unknown. At this point we expect a list or a
dict, with an unknown we don't know what to do.
We could assume the ".id" indicates it should be a dict and turn this
into a runtime type check, but that may hide problems. Best is to
declare the type of "req":
var req: dict<dict<number>> = {}
Then it works.
--
Q: What kind of stuff do you do?
A: I collect hobbies.
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language --
http://www.Zimbu.org ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///