Created
April 9, 2021 07:14
-
-
Save leejh3224/a852fa4fd4933100458775b7e539cbe6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A/getRepositoryName.ts | |
import { Repository } from "typeorm" | |
export function getRepositoryName(entity: EntityClass) { | |
if (entity instanceof Repository) { | |
return "validRepositoryName" | |
} | |
throw new Error("entity is not a valid typeorm Repository") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment