import { Invoice } from './classes/Invoice.ts';
invoice라를 class를 import 한다고 가정
//Invoice.ts
export class Invoice {
constructor(
public client: string,
readonly details: string,
private amount: number
) {}
format() {
return `${this.client} owes $${this.amount} for ${this.details}`;
}
}
컴파일 된 상태에서는 js를 import 할 것이기 때문이다..