Fix type signature for postMessages