Skip to content

Commit 93fde36

Browse files
committed
rename: .js > .ts 파일로 변경
1 parent 565fcd4 commit 93fde36

File tree

8 files changed

+17
-18
lines changed

8 files changed

+17
-18
lines changed

src/App.js renamed to src/App.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import Header from "./components/Header.js";
2-
import TodoForm from "./components/TodoForm.js";
3-
import TodoList from "./components/TodoList.js";
4-
import TodoCount from "./components/TodoCount.js";
5-
import { setItem } from "./utils/storage.js";
1+
import Header from "./component/Header.js";
2+
import TodoForm from "./component/TodoForm.js";
3+
import TodoList from "./component/TodoList.js";
4+
import TodoCount from "./component/TodoCount.js";
5+
import { setItem } from "./util/storage.js";
66

77
export default function App({ $target, initialState, initialCount }) {
88
new Header({

src/components/Header.js renamed to src/component/Header.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import validation from "../utils/validation.js";
1+
import validation from "../util/validation.js";
22

33
export default function Header({ $target, text }) {
44
validation.newTarget(new.target);

src/components/TodoCount.js renamed to src/component/TodoCount.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import validation from "../utils/validation.js";
1+
import validation from "../util/validation.js";
22

33
export default function TodoCount({ $target, initialCount }) {
44
validation.newTarget(new.target);

src/components/TodoForm.js renamed to src/component/TodoForm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import validation from "../utils/validation.js";
1+
import validation from "../util/validation.js";
22

33
export default function TodoForm({ $target, onSubmit }) {
44
validation.newTarget(new.target);

src/components/TodoList.js renamed to src/component/TodoList.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { setItem } from "../utils/storage.js";
2-
import validation from "../utils/validation.js";
1+
import { setItem } from "../util/storage.js";
2+
import validation from "../util/validation.js";
33

44
// params.$target - 해당 컴포넌트가 추가될 DOM 앨리먼트
55
// params.initialState - 해당 컴포넌트의 초기 상태
@@ -24,17 +24,16 @@ export default function TodoList({ $target, initialState, updateCount }) {
2424
$todoList.innerHTML = `
2525
<ul>
2626
${this.state
27-
.map(
28-
({ text, isCompleted }, index) => `
29-
<li data-index=${index} class="todoList ${
30-
isCompleted ? "completed" : ""
31-
}">
27+
.map(
28+
({ text, isCompleted }, index) => `
29+
<li data-index=${index} class="todoList ${isCompleted ? "completed" : ""
30+
}">
3231
${text}
3332
<button class="deleteBtn">삭제</button>
3433
</li>
3534
`
36-
)
37-
.join("")}
35+
)
36+
.join("")}
3837
</ul>
3938
`;
4039
};

src/main.js renamed to src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import App from "./App.js";
2-
import { getItem } from "./utils/storage.js";
2+
import { getItem } from "./util/storage.js";
33

44
const initialState = getItem("todo", []);
55
const initialCount = getItem("count", { total: 0, done: 0 });
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)