腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
1
回答
类型
'
string
|
null
‘
不能
赋值
给
类型
'
SetStateAction
<
string
>’
的
参数
。
类型
'
null
‘
不能
赋值
给
类型
’
SetStateAction
<
string
>‘
reactjs
、
typescript
、
autocomplete
、
material-ui
<Autocomplete onChange={(event, newValue) => { }} onInputChange={(event, newInputValue) => { }} options={options}
浏览 119
提问于2021-04-20
得票数 0
回答已采纳
2
回答
类型
'
string
|
null
‘不可
赋值
给
类型
'
string
’。
类型
“
null
”
不能
赋值
给
类型
“
string
”
javascript
、
node.js
、
angular
、
typescript
错误:
类型
'
string
|
null
‘不可分配给
类型
'
string
’。
类型
'
null
‘不可
赋值
给
类型
'
string
’。错误:
类型
'{ id?:
string
| undefined;title?:
string
| undefined;content?:
string
| undef
浏览 3
提问于2021-03-15
得票数 1
1
回答
空错误:
类型
‘TypeScript’
不能
赋值
给
类型
'
SetStateAction
<
string
>‘
reactjs
、
typescript
、
types
、
arguments
、
state
我有一个字符串
类型
状态:还有一个验证长度函数,我在使用第二个
参数
‘setState’时遇到了问题,意图是使用React value
类型
: const validateStringLength = (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>, value: React.
SetStateAct
浏览 0
提问于2021-04-28
得票数 0
1
回答
'unknown‘
类型
的
参数
不能
赋值
给
'
SetStateAction
<
string
>’
类型
的
参数
reactjs
、
use-state
、
react-typescript
、
conditional-rendering
也就是说,如果他们在选择输入中选择了other,则会出现other
的
文本输入。当我这样做
的
时候,我得到了这个错误:这是内置在typescript中
的
,我想知道是否有人知道是什么导致了这个错误,以及如何修复它。我真的很感谢任何建议或回复,我想在周一之前把它清理干净!代码只是一个普通
的
useState变量,但它在文件中抛出了一个错误。下面是我初始化组件
的
所有导入之后:
浏览 459
提问于2021-02-13
得票数 0
1
回答
'
string
|
null
‘
类型
的
参数
不能
赋值
给
'
string
’
类型
的
参数
。
类型
'
null
‘不可
赋值
给
类型
’
string
‘。to (2345)
angular
、
typescript
错误:'
string
|
null
‘
类型
的
参数
不能
赋值
给
'
string
’
类型
的
参数
。
类型
'
null
‘不可
赋值
给
类型
’
string
‘。http: HttpClient, private webService: WebRequestService,
浏览 286
提问于2021-06-23
得票数 1
回答已采纳
2
回答
如何修复自定义挂钩中
的
typescript错误
javascript
、
reactjs
、
typescript
、
react-hooks
我在我
的
项目中使用了这个ResizeObserver挂钩和typescript const [entry, setEntry] =return [setNode, entry];const [node, entry] = useResizeObserver();当我在我
的
组件中使用这个钩子时,我得到这个错误
类型
'Dispatch<
Set
浏览 16
提问于2020-08-02
得票数 3
1
回答
从firebase获取数据并将其存储到数组时出现Typescript错误[IONIC]
javascript
、
reactjs
、
typescript
、
variables
、
ionic-framework
这就是错误:'any[]‘
类型
的
参数
不能
赋值
给
'
SetStateAction
’
类型
的
参数
。
类型
'any[]‘不可
赋值
给
类型
'never[]’。
类型
'any‘不可
赋值
给
类型
’never‘。is (2345)它出现在setProd
浏览 17
提问于2020-11-15
得票数 0
2
回答
ts(2322):
不能
将'Dispatch<
SetStateAction
<
string
>>‘
赋值
给
类型
'(value: OptionValue) => Dispatch<
SetStateAction
<
string
reactjs
、
typescript
、
tsx
我正在学习Typescript generic与React
的
集成,阅读this article并遵循文章
的
代码,但得到了这个错误: Type 'Dispatch<
SetStateAction
<
string
Type 'OptionValue' is not assignable to type '
SetStateAction
<
string
>'.Type 'number' is not assign
浏览 737
提问于2021-04-29
得票数 1
1
回答
参数
类型
'
string
|
null
‘
不能
赋值
给
参数
类型
'
string
| number | boolean’
angular
、
typescript
'
string
|
null
‘
类型
的
参数
不能
赋值
给
'
string
| number | boolean’
类型
的
参数
。
类型
'
null
‘不可
赋值
给
类型
'
string
| number |boolean’。is (2345)(属性) Use
浏览 145
提问于2021-09-16
得票数 0
回答已采纳
1
回答
'
string
‘
类型
的
React js Typescript
参数
不能
赋值
给
'
SetStateAction
<number>’
类型
的
参数
reactjs
、
typescript
、
tsx
你好,我遇到了这个错误: Argument of type '
string
' is not assignable to parameter of type '
SetStateAction
<number这是我
的
代码
的
一部分: ....
浏览 454
提问于2021-04-28
得票数 1
回答已采纳
1
回答
string
|
null
类型
的
参数
不能
赋值
给
string
error
类型
的
参数
typescript
、
angular11
、
angular-local-storage
"Argument of type '
string
|
null
' is not assignable to parameter of type '
string
'.\n Type '
null
' is not assignable to type '
string
'.
浏览 409
提问于2021-05-14
得票数 0
回答已采纳
2
回答
类型
“
string
[]”
不能
赋值
给
类型
“
string
”
typescript
当我从angular 8升级到angular 9时,我得到了一个有线错误,说“
类型
'
string
[]‘不可
赋值
给
类型
’
string
‘”。当我运行"npm install“时,下面是得到这个错误
的
代码。
浏览 208
提问于2020-09-01
得票数 0
3
回答
参数
类型
“
String
”
不能
赋值
给
参数
类型
“
String
”
flutter
、
dart
、
compiler-errors
在下面的代码中我得到了错误“
参数
类型
'
String
‘
不能
被
赋值
给
参数
类型
'
String
'”: import 'dart:async'; Future s
浏览 564
提问于2021-07-27
得票数 1
回答已采纳
1
回答
参数
类型
'
String
?‘
不能
赋值
给
参数
类型
'
String
‘
flutter
、
flutter-dependencies
参数
类型
'
String
?‘
不能
被
赋值
给
参数
类型
'
String
‘我得到了这个错误,但是以前
的
代码工作正常。我看到人们提出了同样
的
问题,但不理解根本原因。正在使用
的
包是来自github
的
flutter_audio_query nullsafe版本。有人能帮我解决这个问题吗? ?
浏览 22
提问于2021-08-19
得票数 2
1
回答
类型
'{ buildingName:
string
;}‘
不能
赋值
给
类型
'Pick<MoveInFormState,"buildingName">’
reactjs
、
typescript
this.setState({buildingName: building.name})'{ buildingName:
string
;}‘
类型
的
参数
不能
赋值
给
MoveInFormState | ((prevState:只读,属性:只读)) => MoveInFormState | Pick<MoveInFormState,"buildingName"> |
null</
浏览 0
提问于2020-09-04
得票数 1
1
回答
与
类型
为'{ id:
string
;name:
string
;}[]‘
的
参数
混淆
不能
赋值
给
类型
为'
SetStateAction
<never[]>’
的
参数
reactjs
、
typescript
; } 我得到
的
错误如下: setLoadedPlans(房间); Error - TS2345:
不能
将
类型
为'{ id:
string
;name:
string
;}[]‘
的
参数
分配给
类型
为'
SetStateAction
’
的
参数
。*
类型
'{ id:
string
;name:
string
;}[]‘不可
赋值</
浏览 357
提问于2020-11-24
得票数 0
2
回答
类型
'
string
| ArrayBuffer‘
不能
赋值
给
类型
'
string
’
javascript
、
typescript
、
arraybuffer
从FileReader读取字符串时出现TypeScript错误const reader: FileReader = new FileReader(); reader.onload = (e) => {}Type '
string
浏览 1
提问于2018-10-24
得票数 33
回答已采纳
1
回答
如何解决"date“为空
的
问题?
typescript
'Date | Date,Date |
null
>‘
类型
的
参数
不能
赋值
给
'
SetStateAction
const [startDate, setStartDate] = useState<Date|
null
>(new Date()); <div className="rounded bg-night-sky p-5">
浏览 69
提问于2021-01-22
得票数 1
回答已采纳
3
回答
错误:
参数
类型
'
String
?‘
不能
赋值
给
参数
类型
'
String
‘
firebase
、
flutter
、
firebase-realtime-database
、
google-cloud-firestore
、
google-cloud-functions
我在ChatApp上工作,试图保存和上传图像,但是我得到了这样
的
错误,有人知道这是什么原因吗?我得到了这种
类型
的
错误,我找不到任何解决方案.. import 'dart:io'; import 'package:cloud_firestore/cloud_firestore.dart{
浏览 507
提问于2021-11-07
得票数 2
回答已采纳
2
回答
我得到错误
类型
'
null
‘
不能
赋值
给
类型
'
string
’
angular
错误:字符串-错误字符串:
类型
‘src/app/MyComponents/todos/todos.component.ts:13:5 |TS2322’不可分配给
类型
'
string
‘。
不能
赋值
给
'
string
‘
类型
。
类型
'
null
‘不可
赋值
给
类型
'
string
’。 13
浏览 0
提问于2021-12-02
得票数 0
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
Flutter学习二之Dart语言介绍
TypeScript:拥有超能力的JavaScript
undefined、null、NaN、‘’ ·实用技巧
Dart快速入门,赶紧来get!
PHP 8:类型系统改进
热门
标签
更多标签
云服务器
ICP备案
实时音视频
对象存储
云直播
活动推荐
运营活动
广告
关闭
领券