@pbzweihander쯔방
@hongminhee洪 民憙 (Hong Minhee) 제가 방금 Prisma에서 겪은건 JS 단에서 null이 아니어야 하는 값에 null을 준 경우인데요. 상식적으로는 panic 대신에 올바른 에러메시지를 주는게 맞죠. 상황이 특이한게 이 경우엔 사용자로부터 올바른 입력이 들어올것을 보장하는것이 TS 타입입니다ㅋㅋ 그래서 Prisma의 입장은 TS단에서 타입체크를 통과하지 못하는 요청엔 panic을 띄울수있다는 건데 좀 황당하네요.
@bgl@hackers.pubbgl gwyng
@hongminhee@hackers.pub洪 民憙 (Hong Minhee) 그 상황에도 저는 개인적으로는 그게 맞지 않은가 싶어요. TS가 잘못되었을 것을 가정하는것 보다는 TS를 믿고 불필요한 에러 처리를 없애는게 가독성과 성능과 유지보수성 측면에서 낫지 않을지...
If you have a fediverse account, you can quote this note from your own instance. Search https://yuri.garden/notes/a9jn8af52o on your instance and quote it. (Note that quoting is not supported in Mastodon.)