我有像这样的课
class RegisterDto {
phone: Nullable<string> = null;
name?: string;
constructor() {
console.log(this);
}
}
new RegisterDto();
"名称"字段是可选的.如果我在浏览器控制台中运行这段代码,我会得到应有的{phone: null, name: undefined}
.如果我在RN中运行这段代码,我只能得到{phone: null}
我哪里错了?