Kardain
Kardain12mo ago

✅ – ✅ – 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
4 Replies
lebouwski
lebouwski12mo 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
Kardain
Kardain12mo ago
oh ok thank you
reactibot
reactibot12mo ago
This question has an answer! Thank you for helping 😄 If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1143205967304085526
reactibot
reactibot12mo ago
This question has an answer! Thank you for helping 😄 If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1143205967304085526 This thread hasn’t had any activity in 36 hours, so it’s now locked. Threads are closed automatically after 36 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1143205967304085526