Can I tell Typescript that a function will only output null if the input is null?

后端 未结 0 414
北恋
北恋 2020-11-27 16:45

I\'ve got a function to strip null bytes from strings in input data:

export function stripNullBytes(str: string | null): string | null {
  return str?.replace         


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