BCE0019 errors in Custom Editor script

A quad is created from a menu item , then it can be edited in edit mode. However my Custom Editor cannot see the quad.

Assets/Editor/SQuadInspector.js(29,24): BCE0019: ‘size’ is not a member of ‘UnityEngine.Object’. etc, etc …

The editor script is the problem, the quad script is just a generic pocedural 4 vert mesh script.

My Editor script :

#pragma strict

// Add menu to the main menu
@MenuItem ("Custom Item/Create Empty as SQuad")
static function CreateGameObjectAsSQuad() 
{
    var go : GameObject = new GameObject("GameObject");
    go.transform.name = "sQuad";
    go.transform.position = Vector3.zero;
    go.AddComponent("SQuad");
}

// ----

@CustomEditor (SQuad)

class SQuadInspector extends Editor 
{
     // Using a SerializedProperty after the object has been deleted is not possible.
     // UnityEditor.DockArea:OnGUI()
 
    private var btnWidth : GUILayoutOption = GUILayout.MaxWidth(80.0);
    private var btnCenter = new GUIContent("Center", "Recenter quad");
 
        ///* // ----
    function OnInspectorGUI() 
    {
        EditorGUILayout.BeginHorizontal();
        target.size = EditorGUILayout.Vector2Field("Size", target.size);
        target.center = EditorGUILayout.Vector2Field("Handle", target.center);
        EditorGUILayout.EndHorizontal();
 
        if(GUILayout.Button(btnCenter, btnWidth)) 
        { 
            target.center = Vector2.one/2.0; 
            target.Construct(); 
        }
 
        EditorGUILayout.BeginHorizontal();
        target.uvSize = EditorGUILayout.Vector2Field("uvSize", target.uvSize);
        target.uvOffset = EditorGUILayout.Vector2Field("uvOffset", target.uvOffset);
        EditorGUILayout.EndHorizontal();
 
        if (GUI.changed) 
        {
            target.Construct();
        }
    }
        //*/ // ----
 
        ///* // ----
    function OnSceneGUI() 
    {
        if (GUI.changed)
        {
            EditorUtility.SetDirty (target);
        }
    }
        //*/ // ----
}

My SQuad script :

remember this is just for reference to my editor script.

#pragma strict
@script RequireComponent(MeshFilter, MeshRenderer)

// ----
// instead of @script ExecuteInEditMode()
@ContextMenu ("Do Something")
function DoSomething () 
{
    Debug.Log ("Perform operation");
 ConstructOnCreation();
    
}
 
function ConstructOnCreation() 
{
 if(!mesh){
 GetComponent(MeshFilter).mesh = mesh = new Mesh();
 
 verts = new Vector3[4]; 
 uv = new Vector2[4];
 tris = new int[6];
 normals = new Vector3[4]; 
 mesh.name = "sQuad Mesh";
 }
 
 Construct();
}
// ----

public class SQuad extends MonoBehaviour
{
 public var size : Vector2 = Vector2.one;
 public var center : Vector2 = Vector2.one / 2.0;
 private var mesh : Mesh;
 private var uv : Vector2[];
 private var verts : Vector3[];
 private var tris : int[];
 private var normals : Vector3[];
 private var origVerts : Vector3[];
 public var uvSize : Vector2 = Vector2.one;
 public var uvOffset : Vector2 = Vector2.zero;
 
 function Start() 
 {
 if(!mesh){
 GetComponent(MeshFilter).mesh = mesh = new Mesh();
 
 verts = new Vector3[4]; 
 uv = new Vector2[4];
 tris = new int[6];
 normals = new Vector3[4]; 
 mesh.name = "sQuad Mesh";
 Construct();
 }
 }
 
 function Update () 
 {
 if (Input.GetMouseButtonUp(0)) Construct();
 }
 
 function Construct()
 {
 verts[0] = new Vector3( size.x * (0 - center.x), size.y * center.y, 0);
 verts[1] = new Vector3( size.x * (0 - center.x), -size.y * (1-center.y), 0);
 verts[2] = new Vector3( size.x * (1 - center.x), size.y * center.y, 0);
 verts[3] = new Vector3( size.x * (1 - center.x), -size.y * (1-center.y), 0);
 
 uv[0] = new Vector2(uvOffset.x, 1.0 - uvOffset.y);
 uv[1] = new Vector2(uvOffset.x, 1.0 - uvOffset.y - uvSize.y);
 uv[2] = new Vector2(uvOffset.x + uvSize.x, 1.0 - uvOffset.y);
 uv[3] = new Vector2(uvOffset.x + uvSize.x, 1.0 - uvOffset.y - uvSize.y);
 
 normals[0] = -Vector3.forward;
 normals[1] = -Vector3.forward;
 normals[2] = -Vector3.forward;
 normals[3] = -Vector3.forward;
 
 tris[0] = 0;
 tris[1] = 2;
 tris[2] = 1;
 tris[3] = 1;
 tris[4] = 2;
 tris[5] = 3;
 
 mesh.vertices = verts; 
 mesh.uv = uv;
 mesh.triangles = tris;
 mesh.normals = normals;
 
 mesh.RecalculateBounds();
 mesh.RecalculateNormals();
 }
}

I assume that ‘target’ means Editor.target which is of type Object. You would need to cast it to whatever type has .size and .Construct and all that.