TypeScript restrict returned object fields in arguments

前端 未结 0 1777
小鲜肉
小鲜肉 2021-02-06 21:30

I want to restrict keys in a returned object type with passed arguments.

Is it possible to make this work in TypeScript?

interface Test {
    a: number,
           


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