A lock which is mounted onto the surface of the door as opposed to being morticed into the edge of the door.  A nightlatch holds the door shut on a latch which can often be deadlocked into position.

Nightlatches are still sometimes referred to by their traditional name of 'rimlock' although a rimlock usually now refers to a basic security lock for use on internal doors, gates or outbuildings.