我尝试在TypeScript中使用基因剔除,但我认为与here存在相同的问题,但是找不到需要安装的类型。代码行是:
Public WithEvents cmd_event As MSForms.Image
Public WithEvents cmd_event_hovered As MSForms.Image
Private Sub cmd_event_hovered_MouseLeave(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
'PURPOSE: Make close Button color like not hovered when not hovered on
frm_database.Controls(cmd_event.Name & "_pressed").Visible = False
frm_database.Controls(cmd_event.Name).Visible = True
frm_database.Controls(cmd_event_hovered.Name).Visible = True
End Sub
Private Sub cmd_event_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
'PURPOSE: Make close Button color like hovered when hovered on
frm_database.Controls(cmd_event.Name & "_pressed").Visible = False
frm_database.Controls(cmd_event.Name).Visible = False
frm_database.Controls(cmd_event_hovered.Name).Visible = True
End Sub
Private Sub cmd_event_hovered_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
'PURPOSE: Make close Button color like pressed when pressed on
frm_database.Controls(cmd_event.Name & "_pressed").Visible = True
frm_database.Controls(cmd_event.Name).Visible = False
frm_database.Controls(cmd_event_hovered.Name).Visible = True
End Sub
Private Sub cmd_event_hovered_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
'PURPOSE: Make close Button color like normal when mouse release
frm_database.Controls(cmd_event.Name & "_pressed").Visible = False
frm_database.Controls(cmd_event.Name).Visible = True
frm_database.Controls(cmd_event_hovered.Name).Visible = True
'PURPOSE: Action of the buttons
action(cmd_event.Name)
End Sub
,错误是:
ko.extenders.name = function (target : string) {
我该如何解决?
我的代码中其他相同类型的错误是:
error TS2339: Property 'name' does not exist on type 'KnockoutExtenders'.
和
error TS2339: Property 'number' does not exist on type 'KnockoutExtenders'.
获取代码
error TS2339: Property 'modal' does not exist on type 'JQuery<HTMLElement>'.
答案 0 :(得分:0)
看起来.modal()
来自Bootstrap。因此,我不得不通过npm install --save-dev @types/bootstrap
安装引导程序类型。