How to asign a JSON object to a type that add behavior like a class in typescript/javascript

前端 未结 0 1089
北海茫月
北海茫月 2020-12-16 04:52

I have this object thats comes from an API in JSON format:

const timestamp = {
  nanos:0,
  milis: 171 }

I have a class like:

         


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