module bar { namespace bar; prefix bar; revision 2017-02-21; extension ext; typedef my-base-bits-type { type bits { bit bit-a { position 1; } bit bit-b { position 2; } bit bit-c { position 3; } bit bit-d { position 4; } } } leaf my-bits-leaf { type my-base-bits-type { bar:ext; } } }