R
Reactiflux

✅ – ✅ – kardain_ – 15-32 Aug 21

✅ – ✅ – kardain_ – 15-32 Aug 21

KKardain8/21/2023
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
Llebouwski8/21/2023
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
KKardain8/21/2023
oh ok thank you
UUUnknown User8/23/2023
4 Messages Not Public
Sign In & Join Server To View

Looking for more? Join the community!

R
Reactiflux

✅ – ✅ – kardain_ – 15-32 Aug 21

Join Server