Digital logic circuits are based on complementary pairs of n- and p-type field effect transistors (FETs) via complementary metal oxide semiconductor technology. In three-dimensional (3D) or bulk semiconductors, substitutional doping of acceptor or donor impurities is used to achieve p- and n-type FETs. However, the controllable p-type doping of low-dimensional semiconductors such as two-dimensional (2D) transition-metal dichalcogenides (TMDs) has proved to be challenging. Although it is possible to achieve high-quality, low-resistance n-type van der Waals (vdW) contacts on 2D TMDs1-5, obtaining p-type devices by evaporating high-work-function metals onto 2D TMDs has not been realized so far. Here we report high-performance p-type devices on single- and few-layered molybdenum disulfide and tungsten diselenide based on industry-compatible electron beam evaporation of high-work-function metals such as palladium and platinum. Using atomic resolution imaging and spectroscopy, we demonstrate near-ideal vdW interfaces without chemical interactions between the 2D TMDs and 3D metals. Electronic transport measurements reveal that the Fermi level is unpinned and p-type FETs based on vdW contacts exhibit low contact resistance of 3.3 kΩ µm, high mobility values of approximately 190 cm2 V-1 s-1 at room temperature, saturation currents in excess of 10-5 A μm-1 and an on/off ratio of 107. We also demonstrate an ultra-thin photovoltaic cell based on n- and p-type vdW contacts with an open circuit voltage of 0.6 V and a power conversion efficiency of 0.82%.