#__tableName is undefined
2 messages · Page 1 of 1 (latest)
Per https://docs.convex.dev/api/modules/values#genericid, IDs are strings at runtime and __tableName only exists during TypeScript compilation.
Check out #1251451648077987901 message
2 messages · Page 1 of 1 (latest)
Hey, I have a component that takes in an id: Id<"blocks"> | Id<"tables">; and I want to have a quick way to check the type of id.
Currently I was doing: const isPageItem = id && id.__tableName === "blocks"; but __tableName seems to be undefined.
What should I do?
Per https://docs.convex.dev/api/modules/values#genericid, IDs are strings at runtime and __tableName only exists during TypeScript compilation.
Check out #1251451648077987901 message