A Basic Model of Typed Components (extended version)