Skip to content

Commit fe03b2f

Browse files
chore(apiWatch): constraint deep passes boolean (#9952)
1 parent 10ccb9b commit fe03b2f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/runtime-core/src/apiWatch.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,14 @@ function doWatch(
189189
}
190190
}
191191

192+
// TODO remove in 3.5
193+
if (__DEV__ && deep !== void 0 && typeof deep === 'number') {
194+
warn(
195+
`watch() "deep" option with number value will be used as watch depth in future versions. ` +
196+
`Please use a boolean instead to avoid potential breakage.`,
197+
)
198+
}
199+
192200
if (__DEV__ && !cb) {
193201
if (immediate !== undefined) {
194202
warn(

0 commit comments

Comments
 (0)