Open safu9 opened 2 years ago
If needed, I will cretae a PR for this issue.
@safu9
Thank you for your reporting. Replacing a type string
to string | null
can occur a breaking change, as SDK users must introduce a null-check before getting a value. Our team will consider the directionality of implementation.
Thank you.
Versions
Current Behavior
Types of some field values are defined as
string
, but can beundefined
according to the document. Also we are allowed to assignnull
to the fields.Fields that can be undefined and null
kintone.fieldTypes.SingleLineText
)kintone.fieldTypes.MultiLineText
)kintone.fieldTypes.Number
)kintone.fieldTypes.DropDown
)kintone.fieldTypes.Date
)kintone.fieldTypes.Time
)kintone.fieldTypes.DateTime
)kintone.fieldTypes.Link
)Fields that can be null
kintone.fieldTypes.RichText
)Expected Behavior
Types of these field values shoud be defined as
string | undefined | null
orstring | null
, notstring
.Steps to reproduce the issue
When
strict
option in tsconfig is true, this code should not have any error, but do.This code should have a error at
value.trim()
, but don't.