Get Superclass of Subclass in Unityscript

I’ve been looking all over. Using typeof() will only return the subclass.

class Enemy{}
class Beast extends Enemy{}

var beast = new Beast();

print(beast.GetType() == typeof(Enemy));

// >false

For my game to be as efficient as possible, I really need to somehow find the superclass of a subclass, and this is really annoying me. How can you get the superclass?

beast.GetType().BaseType

Here are the docs.

public class A {}

public class B : A {}

public static void Main()
{
    Console.WriteLine(typeof(A) == typeof(B));                 // false
    Console.WriteLine(typeof(A).IsAssignableFrom(typeof(B)));  // true
    Console.WriteLine(typeof(B).IsSubclassOf(typeof(A)));      // true
}

As found here (btw, a much better place for language related questions).