Javascript 定义中尖括号中的类名的用途是什么?
在关于堆栈溢出()的另一个问题中,我看到了这段代码:Javascript 定义中尖括号中的类名的用途是什么?,javascript,extjs,sencha-touch,sencha-touch-2,typescript,Javascript,Extjs,Sencha Touch,Sencha Touch 2,Typescript,在关于堆栈溢出()的另一个问题中,我看到了这段代码: Ext.define("App.view.leaders.MyViewName", { extend: 'App.view.basePopup', xtype: 'MyViewName', config: <Ext.form.IPanel>{ scrollable: 'vertical', items: [ {
Ext.define("App.view.leaders.MyViewName", {
extend: 'App.view.basePopup',
xtype: 'MyViewName',
config: <Ext.form.IPanel>{
scrollable: 'vertical',
items: [
{
xtype: 'fieldset',
title: 'Add New Auto Asset',
instructions: '<hr class="separate" />',
items: [
<Ext.field.ISelect>{
xtype: 'selectfield',
label: 'Borrower Position',
store: 'BorrowerPositionSelectorStore',
},
<Ext.field.ISelect>{
xtype: 'selectfield',
label: 'Asset Type',
store: 'AssetTypeSelectorStore',
},
{
xtype: 'textfield',
name: '',
label: 'Description'
},
{
xtype: 'numberfield',
name: '',
label: 'Value'
}
]
}
]
}
});
Ext.define(“App.view.leaders.MyViewName”{
扩展:“App.view.basePopup”,
xtype:“MyViewName”,
配置:{
可滚动:“垂直”,
项目:[
{
xtype:“字段集”,
标题:“添加新的汽车资产”,
说明:“
”,
项目:[
{
xtype:'selectfield',
标签:“借款人职位”,
store:'借阅者位置SelectorStore',
},
{
xtype:'selectfield',
标签:“资产类型”,
存储:“资产类型选择器存储”,
},
{
xtype:'textfield',
名称:“”,
标签:“说明”
},
{
xtype:'numberfield',
名称:“”,
标签:“值”
}
]
}
]
}
});
组件定义之前的
,
标记的用途是什么?你能给我指一下关于这方面的文档吗?这是泛型的TypeScript构造,请参见:
要指示对象文字的类型,它们使用:
var square = <Square>{};
var square={};
那么,如果我正确理解代码需要由TypeScript编译器进行预处理才能生成有效的javascript?