feat(macros): add compile-time validations to TypedPath macro (#3797)