Фото: Nathan Howard / Reuters
Note that Nested is recursive, defined in terms of itself, but that the recursive invocations of Nested are passed a different type than the original (due to the Array wrapper). A piece of data with the Nested type is a linked list of arrays of numbers, and arrays of arrays of numbers, and arrays of arrays of arrays… with every item in the list containing a deeper level of nesting that the one before it. The type of T changes as the type is unfurled. TypeScript does allow us to write recursive functions which handle this type:。关于这个话题,新收录的资料提供了深入分析
,详情可参考新收录的资料
Credit: Mashable screenshot: Dead in Antares / Ishtar Games
\[G_{\text{linear}} = \begin{cases}\left(\frac{G’ + 0.055}{1.055}\right)^{2.4} & \text{if } G’ 0.04045 \\\frac{G’}{12.92} & \text{otherwise}\end{cases}\],更多细节参见新收录的资料