Bug报告
🔎 搜索词
🕗 版本与回归信息
搜索了一个相关的问题:#30058
⏯ Playground链接
带有相关代码的Playground链接
💻 代码
type ZZZ = {
bar?: number,
foo: string
}
function test<T extends ZZZ>(c: T) {
}
function testArr<T extends ZZZ[]>(c: T) {
}
// case 1:
test({
// foo got intellisense
// bar got intellisense
})
// case 2:
test({
foo: '333',
// bar got intellisense
})
// case 3:
testArr([
{
foo: '111',
// bar got no intellisense
},
])
// case 4:
testArr([
{
// foo got intellisense
// bar got intellisense
}
]);
🙁 实际行为
案例3缺少选项属性的IntelliSense bar
🙂 预期行为
显示属性的完成情况 bar
1条答案
按热度按时间kcwpcxri1#
我想要演示数组中的几个元素如何影响自动补全:
playground链接