Fix typo in optional interface property example. PR716
This commit is contained in:
parent
f2a048c805
commit
0b3bcff5db
@ -85,7 +85,7 @@ interface SquareConfig {
|
||||
|
||||
function createSquare(config: SquareConfig): { color: string; area: number } {
|
||||
let newSquare = {color: "white", area: 100};
|
||||
if (config.color) {
|
||||
if (config.clor) {
|
||||
// Error: Property 'clor' does not exist on type 'SquareConfig'
|
||||
newSquare.color = config.clor;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user