Nestjs 有一点不解
資深大佬 : ChrisV5 5
官方例子在 controller 里面给 Service 传了一个 DTO.
this.catsService.create(createCatDto)
但是 service 里面的定义是
import { Cat } from './interfaces/cat.interface'; create(cat: Cat): void
这个类型检查能过去???
大佬有話說 (6)
官方例子在 controller 里面给 Service 传了一个 DTO.
this.catsService.create(createCatDto)
但是 service 里面的定义是
import { Cat } from './interfaces/cat.interface'; create(cat: Cat): void
这个类型检查能过去???