module a {
    yang-version 1.1;

    namespace "http://example.com/ns/identityref-typedef-a";

    prefix "a";

    organization  "example.com";

    description 
      "Testing identityref typedef type defined in imported module.";

    revision 2018-08-06 {
        description
            "Corrected example to actually define identities
             based on twa baseless (abstract) identities.";
    }
    identity foo;

    identity bar;

    identity foo-based {
        base "foo";
    }

    identity bar-based {
        base "bar";
    }

    typedef my-identityref-typedef-type {
        type identityref {
            base "foo";
        }
    }

}

