Last active
July 18, 2023 12:30
-
-
Save DanielHoffmann/ca4c7cbd4c32baf9086fecbaa871a8e7 to your computer and use it in GitHub Desktop.
Revisions
-
DanielHoffmann revised this gist
Jul 18, 2023 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,4 +12,5 @@ const c = { const a: A = c // valid Object.keys(a) // a, b, c a.c = "c2" // error a.d = "d" // error -
DanielHoffmann revised this gist
Jul 18, 2023 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,4 @@ type A = { a: string b: string @@ -6,8 +7,9 @@ type A = { const c = { a: 'a', b: 'b', c: 'c', } const a: A = c // valid Object.keys(a) // a, b, c a.d = 10 // error -
DanielHoffmann created this gist
Jul 18, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ type A = { a: string b: string } const c = { a: 'a', b: 'b', c: 'c' } const a: A = c // valid a.d = 10 // error