我有一个看起来像这样的对象
{
"sdfsdkhdfs": 1,
"jjgtusdf": 2
}
密钥是随机生成的,而且数量不详。我想在 Typescript 中为这个对象创建一个类型。我该怎么做?
答案 0 :(得分:2)
interface MyObject { [key: string]: number };
答案 1 :(得分:0)
在这里你能做的最好的是<div class="parent-container">
<div class="child1"></div>
<div class="child2"></div>
</div>
.parent-container{
position: relative;
page-break-inside: avoid;
}
.parent-container::after {
content: "";
display: block;
height: 200px;
margin-bottom: -200px;
}
。