custom variable type?

hi

is there a way to make custom variable type? because in some of the default components you see stuff like JointMotor and JointSpring and stuff like that. I am wondering is if there is a way make a custom one

e.g a layerMask and a GameObject in one var.

JointMotor and JointSprint are just structs - you can't make those in javascript, but you can in c#

public struct YourStructName
{
    public GameObject go;
    public LayerMask mask;
}

In javascript, you'd have to do it as a class, which is pretty similar to a struct, but doesn't act as a value type:

class YourClassName
{
    var go : GameObject;
    var mask : LayerMask;
}