is not a member of 'UnityEngine.Component'

When using #pragma strict
The following code causes the error:
trap_magnet1.js(101,46): BCE0019: ‘target’ is not a member of ‘UnityEngine.Component’.

laser1.GetComponent("LightningBolt").target = playerBallCollider.transform;

My script is a javascript.
Lightningbolt is a cs script.
target in that script is a transform.

GetComponent() returns an object (of type Component), you need to perform a cast to be able to access your script variables:

(laser1.GetComponent("LightningBolt") as LightningBolt).target = playerBallCollider.transform;

I’m not a JS user (I prefer C#), so maybe this one-line code is not allowed and you will have to split it in two:

var bolt : LightningBolt = laser1.GetComponent("LightningBolt") as LightningBolt; = playerBallCollider.transform;