diff --git a/person.tsx b/person.tsx new file mode 100644 index 0000000..719aaba --- /dev/null +++ b/person.tsx @@ -0,0 +1,11 @@ +interface IPerson { + name: string; + age: number; +} + +function test(opt: IPerson) { + let key: (keyof IPerson); + for (key in opt) { + console.log(opt[key]); + } +} \ No newline at end of file