We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5240ca commit 6f364f7Copy full SHA for 6f364f7
src/index.ts
@@ -1,5 +1,9 @@
1
-import { User } from "./utils/data.interface";
2
-// 유니온 타입의 user의 key 값을 가지고와 keyof로 간단하게 작성할 수 있다.
3
-type UserKey = keyof User;
+// Partial<T>
4
5
-const uk: UserKey = 'id';
+import { User } from "./utils/data.interface"
+
+let admin: Partial<User> = {
6
+ id: 1,
7
+ name: "Bob",
8
+ // job:"" //-> error interface에 없는 객체를 사용하려고 해서 발생하는 에러이다.
9
+}
0 commit comments