The Boxer
typescript instance of 사용시 본문
728x90
반응형
instanceof checks if the constructors are the same. The thing is that your code gets its own copy of the constructor from the code in the library (because that's how it is, it's not your fault), so they are not the same instance anymore.
The constructors still share the same name though:
instanceof not work correctly in typescript library project
I build a typescript library project. and use some classes from a public package. let's say a simple function to test it is a BadRequestException or not import { BadRequestException } from "@nestjs/
stackoverflow.com
728x90
반응형
Comments