Update method to give more specific object type.
Merge pull request #883 from reciprocity/feature/show-directive-type-import3

Update method to give more specific object type. #59286658