Skip to content

Commit 554596c

Browse files
baseballyamawaynzh
andauthored
docs: use === instead of == (#2727)
Co-authored-by: Wayne Zhang <[email protected]>
1 parent 6e22d51 commit 554596c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: docs/rules/define-emits-declaration.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ const emit = defineEmits<{
3535
3636
/* ✗ BAD */
3737
const emit = defineEmits({
38-
change: (id) => typeof id == 'number',
39-
update: (value) => typeof value == 'string'
38+
change: (id) => typeof id === 'number',
39+
update: (value) => typeof value === 'string'
4040
})
4141
4242
/* ✗ BAD */
@@ -70,8 +70,8 @@ const emit = defineEmits<{
7070
7171
/* ✓ GOOD */
7272
const emit = defineEmits({
73-
change: (id) => typeof id == 'number',
74-
update: (value) => typeof value == 'string'
73+
change: (id) => typeof id === 'number',
74+
update: (value) => typeof value === 'string'
7575
})
7676
7777
/* ✓ GOOD */
@@ -92,8 +92,8 @@ const emit = defineEmits(['change', 'update'])
9292
9393
/* ✗ BAD */
9494
const emit = defineEmits({
95-
change: (id) => typeof id == 'number',
96-
update: (value) => typeof value == 'string'
95+
change: (id) => typeof id === 'number',
96+
update: (value) => typeof value === 'string'
9797
})
9898
9999
/* ✗ BAD */

0 commit comments

Comments
 (0)