Complete the code to declare a readonly property in the interface.
interface User {
[1] id: number;
}The readonly keyword makes the property immutable after initialization.
Complete the code to create an interface with a readonly property 'name'.
interface Person {
[1] name: string;
}The readonly keyword ensures the 'name' property cannot be changed after assignment.
Fix the error in the interface by making the property 'age' readonly.
interface Employee {
[1] age: number;
}Only readonly is valid to make interface properties immutable.
Fill both blanks to declare a readonly property 'title' of type string in the interface.
interface Book {
[1] [2]: string;
}The property name is 'title' and it must be marked readonly to prevent changes.
Fill all three blanks to declare a readonly property 'id' of type number in the interface.
interface Product {
[1] [2]: [3];
}The property 'id' is marked readonly and typed as number.
