TypeScript - narrow type by function asserts

后端 未结 0 915
谎友^
谎友^ 2021-01-31 04:49

I\'m trying to get TS to narrow a type that I am manually modifying in a function:


interface Node {
  parent: string | null;
}

interface NoParent extends Node {         


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