How to rewrite a JavaScript class with functional programming?

后端 未结 0 678
滥情空心
滥情空心 2020-12-04 16:15

I started with an ES6 Class

class Foo {
  id: string;
  bar: string;

  constructor(id: string) {
    this.id = id;
    this.bar = \'initial value\';
  }

  c         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题