In a medium saucepan, combine sugar, cornstarch, lemon juice, egg and juice from can of pineapple. Whisk over low heat until thickened, about 5-8 minutes. Remove from heat and stir in cool whip.
In a large bowl, add pineapple tidbits, apples, marshmallows and peanuts. Pour sauce on top and toss to combine. Refrigerate at least 2 to 3 hours before serving.