Add typed functions rule

@jacobboland