import { ITAddress } from './ITAddress' ; class Address implements IAddress { public city : string ; public state : string ; public zip : number ; constructor ( city , state , zip ) { this . city = city ; this . state = state ; this . zip = zip ; } static create ( archetype ) { return new Address ( archetype . city , archetype . state , archetype . zip ) ; } } interface IAddress { city : string ; state : string ; zip : number ; } function fromAddress ( obj ) { return obj ; } function toIAddress ( obj ) { return obj ; } let address0 = < Address > { } ; let address1 = < IAddress > { } ; let address2 = < ITAddress > { } ; describe ( 'Test' , function ( ) { it ( "Basic test" , function ( ) { let address = Address . create ( { city : 'San Francisco' , state : 'CA' , zip : 94546 } ) ; console . log ( "FIXME: " + typeof address ) ; console . log ( "FIXME: " + ( address instanceof Address ) ) ; } ) ; } ) ;