Closed janedegtiareva closed 5 years ago
compiling with this model file produces an error:
//@nearfile // Exporting a new class TextMessage so it can be used outside of this file. export class TextMessage { sender: string; text: string; number: u64; isRead: bool; }
ERROR TS2531: Object is possibly 'null'.
encoder.setBoolean(name, value); ~~~~
in ~lib/nearEntry.ts(39,23)
Does this happen if you give bool an initial value? If so, it can't be null, so should the default value by false?
fixed! Thank you!
compiling with this model file produces an error:
//@nearfile // Exporting a new class TextMessage so it can be used outside of this file. export class TextMessage { sender: string; text: string; number: u64; isRead: bool; }
ERROR TS2531: Object is possibly 'null'.
in ~lib/nearEntry.ts(39,23)