Consider the following modified example from arrow-js.com:
import { r, w } from "@arrow-js/core";
type Data = {
price: number | null;
quantity: number;
logTotal: boolean;
};
const data = r<Data>({
price: null,
quantity: 10,
logTotal: true,
});
function total() {
if (data.logTotal && data.price !== null) {
console.log(`Total: ${data.price * data.quantity}`);
}
}
w(total);
data.price = 35;
Executing the above yields:
TypeError: null is not an object (evaluating 'e.$on')
Fixed in #14
Owner Name | justin-schroeder |
Repo Name | arrow-js |
Full Name | justin-schroeder/arrow-js |
Language | TypeScript |
Created Date | 2022-11-08 |
Updated Date | 2023-03-25 |
Star Count | 1238 |
Watcher Count | 21 |
Fork Count | 22 |
Issue Count | 7 |
Issue Title | Created Date | Updated Date |
---|