✅ – ✅ – kardain_ – 15-32 Aug 21

hello, i'm wondering what is the difference between : 1:
interface InterfaceName {
property1 : number
}
interface InterfaceName {
property1 : number
}
vs 2:
interface InterfaceName {
"property1": number
}
interface InterfaceName {
"property1": number
}
i didn't knew of the 2nd one until today when i reviewed a project i'm taking over, and i'm wondering why it's used instead of 1
L
lebouwski241d ago
if you want to use leading numbers or special characters you'll need to wrap the key in quotes otherwise it's fine to omit
K
Kardain241d ago
oh ok thank you
UU
Unknown User240d ago