Вт
type ReplaceAll<
S extends string,
From extends string,
To extends string
> = From extends '' ? S :
S extends `${infer L}${From}${infer R}` ? ReplaceAll<`${L}${To}${R}`, From, To> : S;
Size: a a a
Вт
type ReplaceAll<
S extends string,
From extends string,
To extends string
> = From extends '' ? S :
S extends `${infer L}${From}${infer R}` ? ReplaceAll<`${L}${To}${R}`, From, To> : S;
KW
AK
VS
!(a && a.b)
I
!store.localData.customElemets?.browser
AK
AK
VS
EO
EO
if (typeof store.localData?.bla?.bla !== 'undefined') {}
AK
if (typeof store.localData?.bla?.bla !== 'undefined') {}
typeof a === 'undefined'
и a === undefined
и вроде как пришли к выводу, что пофиг как писатьSG
AK
SG
EO
const undefined = false;
const a = false;
typeof a === 'undefined' // false
a === undefined // true
VS
const undefined = false;
const a = false;
typeof a === 'undefined' // false
a === undefined // true
VS
VS
AS
if (typeof store.localData?.bla?.bla !== 'undefined') {}
typeof === 'undefined'
генерится значительно больше кода, чем на === undefined
AK
const undefined = false;
const a = false;
typeof a === 'undefined' // false
a === undefined // true
const undefined
это реально надо постараться