Neural network in TypeScript