Here is a code snippet I am working with:
type RouterQuery = keyof AppRouter['_def']['queries'];
This code defines the following type:
type RouterQuery = "healthz" | "post.all" | "post.byId" | "category.all" | "category.byId" | "course.all" | "course.featured"
My goal is to extract only strings that contain the '.all' postfix.
The desired extracted type should be:
type RouterQueryAll = "post.all" | "category.all" | "course.all"
Any solutions on how I can achieve this?