typedef a { type string { x:some-extension; } } leaf z { type a; } If you get the extensions on Type, you do not see x:some-extension in the list in Type for a