1.  
  2. declare function require(moduleNames: string[], onLoad: (...args: any[]) => void): void;
  3.  
  4. import * as Zip from "./ZipCodeValidator";
  5.  
  6. if (needZipValidation) {
  7. require(["./ZipCodeValidator"], (ZipCodeValidator: typeof Zip) => {
  8. let validator = new ZipCodeValidator.ZipCodeValidator();
  9. if (validator.isAcceptable("...")) { /* ... */ }
  10. });
  11. }
  12.