Import a single export from a module

Import a single export from a module

import { ZipCodeValidator } from "./ZipCodeValidator";

let myValidator = new ZipCodeValidator();

imports can also be renamed

import { ZipCodeValidator as ZCV } from "./ZipCodeValidator";
let myValidator = new ZCV();
doc_TypeScript
2016-10-04 19:25:17
Comments
Leave a Comment

Please login to continue.