sharing type defs in cps