This project is read-only.

Subclassing TypeScript classes from "pure Javascript classes"

Topics: General
Mar 24, 2013 at 4:57 PM
I have an existing codebase which uses its own JavaScript prototypial class syntax.


Is it possible to create TypeScript classes which subclass from these classes? Or alternative, does TypeScript require that all classes in the parent superclass chain are based on pure TypeScript?
Mar 24, 2013 at 9:54 PM
Simply provide an ambient class definition for the class. The declarations are a way to provide typed definitions of existing code. Three.js is popular and ambient declarations have already been made, so just leverage them:
Mar 25, 2013 at 12:17 AM
Wonderful. Thank you!