Versions
Current Behavior
Types of some field values are defined as string, but can be undefined according to the document.
Also we are allowed to assign null to the fields.
Fields that can be undefined and null
- Text (
kintone.fieldTypes.SingleLineText)
- Text Area (
kintone.fieldTypes.MultiLineText)
- Number (
kintone.fieldTypes.Number)
- Drop-down (
kintone.fieldTypes.DropDown)
- Date (
kintone.fieldTypes.Date)
- Time (
kintone.fieldTypes.Time)
- Date and time (
kintone.fieldTypes.DateTime)
- Link (
kintone.fieldTypes.Link)
Fields that can be null
- Rich Text (
kintone.fieldTypes.RichText)
Expected Behavior
Types of these field values shoud be defined as string | undefined | null or string | null, not string.
Steps to reproduce the issue
When strict option in tsconfig is true, this code should not have any error, but do.
const field : kintone.fieldTypes.SingleLineText = { value: null };
This code should have a error at value.trim(), but don't.
const trimedValue = field.value.trim();
Versions
Current Behavior
Types of some field values are defined as
string, but can beundefinedaccording to the document.Also we are allowed to assign
nullto 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 | nullorstring | null, notstring.Steps to reproduce the issue
When
strictoption 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.