Is there a public way to get a list of template vars?

Because this feature has been there in 3.0 and it would be nice to still have it?