:lady_beetle: `List.Pop<L>` not working with single entry arrays
rubenaeg opened this issue · comments
Ruben commented
🐞 Bug Report
Describe the bug
When using List.Pop<L>
with only one entry in the list, the resulting type is an empty list instead of the single element.
Reproduce the bug
// This throws a compiler error
const invalid: List.Pop<['key']> = ['key'];
// This works
const valid: List.Pop<['key']> = [];
Expected behavior
I would expect the type to behave similar to Array.pop()
, and it's description lets one assume that it does, but the above example showcases that this is not the case.
Possible Solution
I'm currently testing out a solution for this, as soon as I have more insight I will update the issue.
Screenshots
Additional context
wushuang5112 commented
这是来自QQ邮箱的假期自动回复邮件。
您好,双喜已收到您的邮件,期待与您再次联系!