但是当我构建它的时候,它得到一个错误 Argument of type 'undefined' is not assignable to parameter of type 'Promise<any>| PromiseLike<Promise<any>>' 在线 .mockResolvedValueOnce(void 0 ) 我不确定如何修复这个问题,因为我不确定promise类型是什么意思。
我收到了警告Argument of type 'any' is not assignable to parameter of type 'never'.ts(2345) Object is of type'unknown'.ts(2571){"A":[{"filter":[{"a":"a"}]},{"group":[{"a":"a"}]}]
当我更新angular版本的时候,我得到了类似主题的错误。我该如何解决这个问题呢? 我得到的界面如下: export interface Alias {} 在我的component.ts export class HomeComponent implements OnInit {
alias: Alias 在那里,我想从后端获取数据home.component.html:154:44 - error TS2345: Argument of type 'Alias'
我在这里收到一个错误,newUser this.userObj.assigned_to.push(newUser); as argument of type 'any' is not assignable谢谢你的帮助。addSubData(user: any) { i = document.querySelectorAll('input[type="checkbox"]:checked
我是一个非常新手的TypeScript,现在我试图理解接口是如何在React组件的类方法中工作的。我为它创建了一个简单的案例,但它不起作用。我总是收到一个错误,就像这篇文章的标题一样。import React, { Component } from 'react'
a: any[]
class Test extends Component {
嗨,我在我的代码中收到一个打字错误。以下是我的代码。Argument of type 'any[]' is not assignable to parameter of type '(value: [any, Campaign[]]) => void'Type 'any[]' provides no match for the signature '(value: [any, Campaign[]]): void