我正在使用visual studio学习typeScript并尝试进行简单的类导出.我已多次看到这个问题,但没有一个解决方案对我有帮助.我究竟做错了什么 ?
仍然是相同的错误"未捕获的ReferenceError:导出未定义在......"
import { Address } from "./address";
class Customer {
protected name: string = "";
public addressObj: Address = new Address();
private _CustomerName: string = "";
public set CustomerName(value: string) {
if (value.length == 0) {
throw "Customer name is requaierd"
}
this._CustomerName = value;
}
public get CustomerName(): string {
return this._CustomerName;
}
}Run Code Online (Sandbox Code Playgroud)
export class Address {
public street1: string = "";
}Run Code Online (Sandbox Code Playgroud)
<!doctype html>
<html>
<head>
<title></title>
<meta …Run Code Online (Sandbox Code Playgroud)